diff options
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_map_normal.py')
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_map_normal.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_map_normal.py b/io_scene_gltf2/blender/imp/gltf2_blender_map_normal.py index ab09f24c..0f7bab81 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_map_normal.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_map_normal.py @@ -22,17 +22,17 @@ class BlenderNormalMap(): raise RuntimeError("%s should not be instantiated" % cls) @staticmethod - def create(gltf, material_idx): + def create(gltf, material_idx, vertex_color): """Creation of Normal map.""" engine = bpy.context.scene.render.engine if engine in ['CYCLES', 'BLENDER_EEVEE']: - BlenderNormalMap.create_nodetree(gltf, material_idx) + BlenderNormalMap.create_nodetree(gltf, material_idx, vertex_color) - def create_nodetree(gltf, material_idx): + def create_nodetree(gltf, material_idx, vertex_color): """Creation of Nodetree.""" pymaterial = gltf.data.materials[material_idx] - material = bpy.data.materials[pymaterial.blender_material] + material = bpy.data.materials[pymaterial.blender_material[vertex_color]] node_tree = material.node_tree BlenderTextureInfo.create(gltf, pymaterial.normal_texture.index) |