[Bf-extensions-cvs] [2258567b] master: glTF importer: Fix bug with vertex color on instantiated meshes
Julien Duroure
noreply at git.blender.org
Sat Jan 12 15:54:47 CET 2019
Commit: 2258567be81c415832e49fa2370f030f71aa7227
Author: Julien Duroure
Date: Sat Jan 12 15:53:32 2019 +0100
Branches: master
https://developer.blender.org/rBA2258567be81c415832e49fa2370f030f71aa7227
glTF importer: Fix bug with vertex color on instantiated meshes
===================================================================
M io_scene_gltf2/blender/imp/gltf2_blender_node.py
===================================================================
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_node.py b/io_scene_gltf2/blender/imp/gltf2_blender_node.py
index 0e49e28b..df5b5a42 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_node.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_node.py
@@ -36,8 +36,10 @@ class BlenderNode():
if pynode.mesh is not None:
+ instance = False
if gltf.data.meshes[pynode.mesh].blender_name is not None:
# Mesh is already created, only create instance
+ instance = True
mesh = bpy.data.meshes[gltf.data.meshes[pynode.mesh].blender_name]
else:
if pynode.name:
@@ -67,7 +69,8 @@ class BlenderNode():
pynode.blender_object = obj.name
BlenderNode.set_parent(gltf, pynode, obj, parent)
- BlenderMesh.set_mesh(gltf, gltf.data.meshes[pynode.mesh], mesh, obj)
+ if instance == False:
+ BlenderMesh.set_mesh(gltf, gltf.data.meshes[pynode.mesh], mesh, obj)
if pynode.children:
for child_idx in pynode.children:
More information about the Bf-extensions-cvs
mailing list