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.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
index f0d0af2a..2d346638 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
@@ -79,7 +79,10 @@ class BlenderMesh():
# Object and UV are now created, we can set UVMap into material
for prim in pymesh.primitives:
- BlenderPrimitive.set_UV_in_mat(gltf, prim, obj)
+ vertex_color = None
+ if 'COLOR_0' in prim.attributes.keys():
+ vertex_color = 'COLOR_0'
+ BlenderPrimitive.set_UV_in_mat(gltf, prim, obj, vertex_color)
# Assign materials to mesh
offset = 0