glTF exporter: fix getting uv_layer in certain cases

uv_textures > uv_layers
This commit is contained in:
Philipp Oeser 2018-11-25 10:36:40 +01:00
parent ca90ba2b75
commit be2df52491
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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