[Bf-extensions-cvs] [618c842c] blender2.8: glTF importer: Fix issue for UVMap when multiple materials on same object

Julien Duroure noreply at git.blender.org
Sat Dec 15 23:12:47 CET 2018


Commit: 618c842c3e486a7b83f81eabaa21ec4c59bafb0c
Author: Julien Duroure
Date:   Sat Dec 15 23:12:01 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBA618c842c3e486a7b83f81eabaa21ec4c59bafb0c

glTF importer: Fix issue for UVMap when multiple materials on same object

===================================================================

M	io_scene_gltf2/blender/imp/gltf2_blender_primitive.py

===================================================================

diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_primitive.py b/io_scene_gltf2/blender/imp/gltf2_blender_primitive.py
index 93bab542..59e13391 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_primitive.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_primitive.py
@@ -118,7 +118,7 @@ class BlenderPrimitive():
         for texcoord in [attr for attr in pyprimitive.attributes.keys() if attr[:9] == "TEXCOORD_"]:
             if texcoord not in mesh.uv_layers:
                 mesh.uv_layers.new(name=texcoord)
-                pyprimitive.blender_texcoord[int(texcoord[9:])] = texcoord
+            pyprimitive.blender_texcoord[int(texcoord[9:])] = texcoord
 
             texcoord_data = BinaryData.get_data_from_accessor(gltf, pyprimitive.attributes[texcoord])
             for poly in mesh.polygons:



More information about the Bf-extensions-cvs mailing list