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:
-rw-r--r--io_import_images_as_planes.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 5c5b1676..85a2d230 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -524,11 +524,13 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
elif self.shader == 'EMISSION':
emission = node_tree.nodes.new('EMISSION')
+ lightpath = node_tree.nodes.new('LIGHT_PATH')
tex_image = node_tree.nodes.new('TEX_IMAGE')
tex_image.image = image
tex_image.show_texture = True
node_tree.links.new(out_node.inputs[0], emission.outputs[0])
node_tree.links.new(emission.inputs[0], tex_image.outputs[0])
+ node_tree.links.new(emission.inputs[1], lightpath.outputs[0])
elif self.shader == 'BSDF_DIFFUSE_BSDF_TRANSPARENT':
bsdf_diffuse = node_tree.nodes.new('BSDF_DIFFUSE')
@@ -545,6 +547,7 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
elif self.shader == 'EMISSION_BSDF_TRANSPARENT':
emission = node_tree.nodes.new('EMISSION')
+ lightpath = node_tree.nodes.new('LIGHT_PATH')
bsdf_transparent = node_tree.nodes.new('BSDF_TRANSPARENT')
mix_shader = node_tree.nodes.new('MIX_SHADER')
tex_image = node_tree.nodes.new('TEX_IMAGE')
@@ -555,6 +558,7 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
node_tree.links.new(mix_shader.inputs[2], emission.outputs[0])
node_tree.links.new(mix_shader.inputs[1], bsdf_transparent.outputs[0])
node_tree.links.new(emission.inputs[0], tex_image.outputs[0])
+ node_tree.links.new(emission.inputs[1], lightpath.outputs[0])
auto_align_nodes(node_tree)
return material