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] renderer の export しない基準 GameObject.active / Renderer.enabled を修正 #2449

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Sep 26, 2024

fixed #2437
fixed #2434
fixed #1980

export 時の renderer の export 基準を徹底した。

x.gameObject.activeInHierarchy && x.TryGetComponent<Renderer>(out var renderer) && renderer.enabled

関連して firstPerson.annotations と expression.binds の mesh/node が連動するのだけど、
残るバグがあった。

既存のモデルに firstPerson.annotations と expression.binds の無効な参照が残っている場合向けに
importer のチェックを追加した。

x.gameObject.activeInHierarchy && x.TryGetComponent<Renderer>(out var renderer) && renderer.enabled)

mesh の export 条件と renderer の export 条件が別であることに注意。gltf の node.mesh
@@ -162,7 +162,7 @@ async Task<BlendShapeClip> LoadBlendShapeBind(glTF_VRM_BlendShapeGroup group, Di
// fallback
asset.Preset = CachedEnum.ParseOrDefault<BlendShapePreset>(group.name, true);
}
asset.Values = group.binds.Select(x =>
asset.Values = group.binds.Where(x => x.mesh >= 0 && x.mesh < Meshes.Count).Select(x =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Importer の修正もある?

@ousttrue ousttrue changed the title Fix/export index of [exporter] renderer の export しない基準 GameObject.active / Renderer.enabled を修正 Sep 26, 2024
@ousttrue ousttrue merged commit 0e9020a into vrm-c:master Sep 26, 2024
1 check passed
@ousttrue ousttrue deleted the fix/export_index_of branch September 26, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants