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:
authorJulien Duroure <julien.duroure@gmail.com>2019-01-12 17:53:32 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-01-12 17:53:32 +0300
commit2258567be81c415832e49fa2370f030f71aa7227 (patch)
tree18547920baa615ecc8de3317a55501027616d258 /io_scene_gltf2/blender/imp/gltf2_blender_node.py
parenta2e1c4f1d1a236bbce714cb3ca52b3493c13aea7 (diff)
glTF importer: Fix bug with vertex color on instantiated meshes
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_node.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_node.py5
1 files changed, 4 insertions, 1 deletions
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: