glTF importer: Fix T70863 metallic texture transform fix after api change

This commit is contained in:
Julien Duroure 2019-10-16 07:25:30 +02:00
parent d892f8a96e
commit 88333d082f
Notes: blender-bot 2023-02-14 00:28:11 +01:00
Referenced by issue blender/blender#70863, gltf import error (2.81, 2.82)
1 changed files with 5 additions and 5 deletions

View File

@ -305,11 +305,11 @@ class BlenderPbr():
metallic_mapping.location = -1000, 0
metallic_mapping.vector_type = 'POINT'
tex_transform = metallic_text.image['tex_transform'][str(pypbr.metallic_roughness_texture.index)]
metallic_mapping.translation[0] = texture_transform_gltf_to_blender(tex_transform)['offset'][0]
metallic_mapping.translation[1] = texture_transform_gltf_to_blender(tex_transform)['offset'][1]
metallic_mapping.rotation[2] = texture_transform_gltf_to_blender(tex_transform)['rotation']
metallic_mapping.scale[0] = texture_transform_gltf_to_blender(tex_transform)['scale'][0]
metallic_mapping.scale[1] = texture_transform_gltf_to_blender(tex_transform)['scale'][1]
metallic_mapping.inputs['Location'].default_value[0] = texture_transform_gltf_to_blender(tex_transform)['offset'][0]
metallic_mapping.inputs['Location'].default_value[1] = texture_transform_gltf_to_blender(tex_transform)['offset'][1]
metallic_mapping.inputs['Rotation'].default_value[2] = texture_transform_gltf_to_blender(tex_transform)['rotation']
metallic_mapping.inputs['Scale'].default_value[0] = texture_transform_gltf_to_blender(tex_transform)['scale'][0]
metallic_mapping.inputs['Scale'].default_value[1] = texture_transform_gltf_to_blender(tex_transform)['scale'][1]
metallic_uvmap = node_tree.nodes.new('ShaderNodeUVMap')
metallic_uvmap.location = -1500, 0