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

Don't log warning when alphaMode property is not set on glTFMaterial #2504

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented Nov 12, 2024

Loading a .vrm file gives an "invalid alphaMode" warning in case no alphaMode is set. According to the glTF specification, the alphaMode property is not required and the default value is OPAQUE (material.schema.json#L45).
image

This PR adds a case that treats null as OPAQUE without logging the warning. In case an actual invalid value is set, the warning is still logged.

@ousttrue ousttrue added this to the v0.128.1 milestone Nov 13, 2024
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.

Thank you for your contribution.

This fix is necessary for following the glTF specification!

@ousttrue ousttrue merged commit bab1085 into vrm-c:master Nov 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants