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

Allow normalization in gather_attribute_change user extension #1955

Merged

Conversation

patrtoth
Copy link
Contributor

This PR allows to mark data as normalized from a user extension like https://github.com/julienduroure/gltf-hooks-examples/blob/main/gltf_attribute_change.py

The motivation being, that one might want to transform a Float attribute into a UnsignedByte color attribute that requires the "normalized":true tag in the glTF 2.0 accessor to be valid.

The only change is exposing the normalization boolean and allowing it to be set in a user extension like

data["normalized"] = True

@CLAassistant
Copy link

CLAassistant commented Jul 19, 2023

CLA assistant check
All committers have signed the CLA.

@julienduroure julienduroure added this to the Blender 4.0 milestone Aug 12, 2023
@patrtoth
Copy link
Contributor Author

I added an example based on @julienduroure 's user extension that would make use of this change:
https://gist.github.com/patrtoth/7c1fad78e5264758d8d5a3b6e6cf1ea4
When enabled, this extension changes floating point precision vertex colors into raw unsigned byte colors during export.

@julienduroure julienduroure merged commit 81bd796 into KhronosGroup:main Sep 6, 2023
1 check passed
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.

3 participants