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

glTF2s with blend weights being zero is being rejected #38751

Closed
fire opened this issue May 15, 2020 · 2 comments · Fixed by #38763
Closed

glTF2s with blend weights being zero is being rejected #38751

fire opened this issue May 15, 2020 · 2 comments · Fixed by #38763

Comments

@fire
Copy link
Member

fire commented May 15, 2020

Godot version:
3.2 stable from Steam

OS/device including version:
Win10

Issue description:

I had a model with blend shapes defined but with 0 blend weights. It is not required to be in the model format and should not be rejected with a parse error.

https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#mesh

ERR_FAIL_COND_V(mesh->blend_weights.size() == 0, ERR_PARSE_ERROR);

ERR_FAIL_COND_V(mesh->blend_weights.size() == 0, ERR_PARSE_ERROR);

The fix is to be determined.

Steps to reproduce:

Import a gltf2 with the blend weights array deleted and it will fail to import.

Minimal reproduction project:

38751.zip

From https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AnimatedMorphCube but with https://github.com/KhronosGroup/glTF-Sample-Models/blob/5aec133dbaf543f9bcb6cb79de9966bf9530c2fe/2.0/AnimatedMorphCube/glTF/AnimatedMorphCube.gltf#L235-L238 deleted.

@slapin
Copy link
Contributor

slapin commented May 15, 2020

aw these assert reverts :( totally flip my brain...

@slapin
Copy link
Contributor

slapin commented May 15, 2020

Anyway are you sure these checks are necessary? meshes work fine without weights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants