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

fix mesh == null #1020

Merged
merged 1 commit into from
Jun 16, 2021
Merged

fix mesh == null #1020

merged 1 commit into from
Jun 16, 2021

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue requested a review from Santarh June 10, 2021 08:31
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.

glTFExporter 自体は、適さない入力に対してはなるべく例外を吐きたい気がするが、LGTM

@@ -164,7 +164,12 @@ static glTFNode ExportNode(Transform x, List<Transform> nodes, List<MeshExportIn
{
node.mesh = meshIndex;
}
else if (mesh != null && !mesh.vertices.Any())
Copy link
Contributor

Choose a reason for hiding this comment

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

Mesh は存在するが、頂点数が 0

@@ -164,7 +164,12 @@ static glTFNode ExportNode(Transform x, List<Transform> nodes, List<MeshExportIn
{
node.mesh = meshIndex;
}
else if (mesh != null && !mesh.vertices.Any())
else if (mesh == null)
Copy link
Contributor

Choose a reason for hiding this comment

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

メッシュが存在しない

// mesh が無い
node.mesh = -1;
}
else if (mesh.vertexCount == 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

メッシュは存在するが、頂点数が 0

@ousttrue
Copy link
Contributor Author

Validator で Error になるものは Export ボタンが無効化されるが、
Warn になるものの null check が不足していた

@ousttrue ousttrue closed this Jun 11, 2021
@ousttrue ousttrue reopened this Jun 16, 2021
@ousttrue ousttrue merged commit db9c56c into vrm-c:master Jun 16, 2021
@ousttrue
Copy link
Contributor Author

merge したつもりで、間違えて close してた

@ousttrue
Copy link
Contributor Author

v0.77.0

@ousttrue ousttrue deleted the fix/mesh_is_null branch October 27, 2021 06:00
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.

2 participants