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:
authorPhilipp Oeser <info@graphics-engineer.com>2018-11-25 12:36:40 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2018-11-25 12:41:22 +0300
commitbe2df5249105015aaafb06def0d1279c559c56ff (patch)
tree1650245834305a17ae2fb946106b63d715fa6b3d
parentca90ba2b753a846158d0723dfcb0c6eb1fae3288 (diff)
glTF exporter: fix getting uv_layer in certain cases
uv_textures > uv_layers
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_get.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py
index 0d314681..4599c7dc 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py
@@ -90,7 +90,7 @@ def __gather_tex_coord(blender_shader_sockets_or_texture_slots, export_settings)
# Try to gather map index.
for blender_mesh in bpy.data.meshes:
- texCoordIndex = blender_mesh.uv_textures.find(input_node.uv_map)
+ texCoordIndex = blender_mesh.uv_layers.find(input_node.uv_map)
if texCoordIndex >= 0:
return texCoordIndex
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py
index af219318..c9c70e42 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py
@@ -90,7 +90,7 @@ def __gather_tex_coord(blender_shader_sockets_or_texture_slots, export_settings)
# Try to gather map index.
for blender_mesh in bpy.data.meshes:
- texCoordIndex = blender_mesh.uv_textures.find(input_node.uv_map)
+ texCoordIndex = blender_mesh.uv_layers.find(input_node.uv_map)
if texCoordIndex >= 0:
return texCoordIndex
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py
index 149a2a84..225e686b 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py
@@ -85,7 +85,7 @@ def __gather_tex_coord(blender_shader_sockets_or_texture_slots, export_settings)
# Try to gather map index.
for blender_mesh in bpy.data.meshes:
- texCoordIndex = blender_mesh.uv_textures.find(input_node.uv_map)
+ texCoordIndex = blender_mesh.uv_layers.find(input_node.uv_map)
if texCoordIndex >= 0:
return texCoordIndex
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_get.py b/io_scene_gltf2/blender/exp/gltf2_blender_get.py
index 27135224..468ba692 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_get.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_get.py
@@ -318,7 +318,7 @@ def get_texcoord_index_from_shader_node(glTF, name, shader_node):
# Try to gather map index.
for blender_mesh in bpy.data.meshes:
- texCoordIndex = blender_mesh.uv_textures.find(input_node.uv_map)
+ texCoordIndex = blender_mesh.uv_layers.find(input_node.uv_map)
if texCoordIndex >= 0:
return texCoordIndex