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.py7
1 files changed, 5 insertions, 2 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 22af5ccb..79cc93cd 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_map_emissive.py
@@ -71,9 +71,12 @@ class BlenderEmissiveMap():
uvmap["gltf2_texcoord"] = 0 # TODO: set in precompute instead of here?
text = node_tree.nodes.new('ShaderNodeTexImage')
- text.image = bpy.data.images[gltf.data.images[
+ if gltf.data.images[
gltf.data.textures[pymaterial.emissive_texture.index].source
- ].blender_image_name]
+ ].blender_image_name is not None:
+ text.image = bpy.data.images[gltf.data.images[
+ gltf.data.textures[pymaterial.emissive_texture.index].source
+ ].blender_image_name]
text.label = 'EMISSIVE'
text.location = -1000, 1000
add = node_tree.nodes.new('ShaderNodeAddShader')