Skip to content
Snippets Groups Projects
Commit 7e2fa377 authored by Julien Duroure's avatar Julien Duroure
Browse files

glTF exporter: fix additional Vertex Color normalization

parent 99d2c979
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
bl_info = { bl_info = {
'name': 'glTF 2.0 format', 'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (3, 4, 35), "version": (3, 4, 36),
'blender': (3, 3, 0), 'blender': (3, 3, 0),
'location': 'File > Import-Export', 'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0', 'description': 'Import-Export as glTF 2.0',
......
...@@ -148,7 +148,7 @@ def __gather_attribute(blender_primitive, attribute, export_settings): ...@@ -148,7 +148,7 @@ def __gather_attribute(blender_primitive, attribute, export_settings):
"POSITION": True "POSITION": True
} }
if (attribute.startswith("_COLOR") or attribute.startswith("COLOR_")) and blender_primitive["attributes"][attribute]['component_type'] == gltf2_io_constants.ComponentType.UnsignedShort: if (attribute.startswith("_") or attribute.startswith("COLOR_")) and blender_primitive["attributes"][attribute]['component_type'] == gltf2_io_constants.ComponentType.UnsignedShort:
# Byte Color vertex color, need to normalize # Byte Color vertex color, need to normalize
data['data'] *= 65535 data['data'] *= 65535
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment