Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_mesh.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_mesh.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
index c29f5a27..395fde0f 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
@@ -305,6 +305,10 @@ def do_primitives(gltf, mesh_idx, skin_idx, mesh, ob):
mesh.color_attributes[layer.name].data.foreach_set('color', squish(loop_cols[col_i]))
+ # Make sure the first Vertex Color Attribute is the rendered one
+ if num_cols > 0:
+ mesh.color_attributes.render_color_index = 0
+
# Skinning
# TODO: this is slow :/
if num_joint_sets and mesh_options.skinning: