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:
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py b/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py
index 81cfd76e..c3d0cb22 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py
@@ -23,17 +23,17 @@ class BlenderEmissiveMap():
raise RuntimeError("%s should not be instantiated" % cls)
@staticmethod
- def create(gltf, material_idx):
+ def create(gltf, material_idx, vertex_color):
"""Create emissive map."""
engine = bpy.context.scene.render.engine
if engine in ['CYCLES', 'BLENDER_EEVEE']:
- BlenderEmissiveMap.create_nodetree(gltf, material_idx)
+ BlenderEmissiveMap.create_nodetree(gltf, material_idx, vertex_color)
- def create_nodetree(gltf, material_idx):
+ def create_nodetree(gltf, material_idx, vertex_color):
"""Create node tree."""
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.emissive_texture.index)