Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter] asset.generator を修正 #2171

Merged
merged 4 commits into from
Oct 20, 2023
Merged

Conversation

ousttrue
Copy link
Contributor

fixed #1896

バージョン番号の定数を vrm から unigltf に移動。
名前も vrm じゃなくて UniVRM のパッケージ番号であることを明示した。

@ousttrue ousttrue requested a review from Santarh October 20, 2023 09:13
@Santarh
Copy link
Contributor

Santarh commented Oct 20, 2023

現状のリポジトリとパッケージの構成名の関係から、どうするのが望ましいのかちょっと考えてからレビューをする

  • UniVRM(リポジトリ名・開発名)
    • UniGLTF ( com.vrmc.gltf )
    • VRM ( com.vrmc.univrm )
    • VRM10 ( com.vrmc.vrm )

@Santarh
Copy link
Contributor

Santarh commented Oct 20, 2023

この PullReq で行いたいことは generator の出力値を

  • glTF: UniGLTF-{UniGLTFVersion.VERSION} から変更なし
  • VRM0.X: UniGLTF-{UniGLTFVersion.VERSION} から変更なし
  • VRM1.0: 空から UniVRM-{UniVrmPackageVersion.VERSION} に変更

という認識で合ってますよね?

Copy link
Contributor

@Santarh Santarh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

やりたいことの主旨は LGTM です。

  • glTFAssets のデフォルト値だと Importer に副作用があるので Exporter で解決してほしい
  • UniGLTF が VRM という名前を知っている状況が割れ窓的なので、VRM という名前を登場させたくない

と考えます。

@@ -6,7 +6,7 @@ namespace UniGLTF
[Serializable]
public class glTFAssets
{
public string generator;
public string generator = $"UniVRM-{UniVrmPackageVersion.VERSION}";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このクラスは glTF 定義を表すものですし、Importer でも参照される定義なので
デフォルト値として UniVRM の知識を入れてしまうのは良くないと考えます。
たとえば generator の定義がない glTF ファイルを読み込んだときに、この値が入ってしまいます。

したがって Exporter 実装で代入する方が望ましいと考えます。

{
public static partial class VRMVersion
public static partial class UniVrmPackageVersion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここで言う "UniVRM" は com.vrmc.univrm ではなく UniVRM(リポジトリ名) であることは分かるのですが……

UniVRM という名前は含めたくない気持ちはけっこうあります。
これが存在しているだけで「UniGLTF は UniVRM を知っていていいんだな」という割れ窓になってしまう気持ちがあります。

PackageVersion でいいんじゃないかなあ…

@ousttrue ousttrue requested a review from Santarh October 20, 2023 10:19
Copy link
Contributor

@Santarh Santarh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ousttrue ousttrue merged commit ad8a938 into vrm-c:master Oct 20, 2023
1 check passed
@ousttrue ousttrue deleted the fix/version_menu branch January 24, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assets.generator が空になっている
2 participants