[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3628] trunk/py/scripts/addons/ io_import_images_as_planes.py: Make Cycles emission autogenerated material trully shadeless ( not cast light)

Daniel Salazar zanqdo at gmail.com
Mon Jul 16 05:00:42 CEST 2012


Revision: 3628
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3628
Author:   zanqdo
Date:     2012-07-16 03:00:41 +0000 (Mon, 16 Jul 2012)
Log Message:
-----------
Make Cycles emission autogenerated material trully shadeless (not cast light)

Modified Paths:
--------------
    trunk/py/scripts/addons/io_import_images_as_planes.py

Modified: trunk/py/scripts/addons/io_import_images_as_planes.py
===================================================================
--- trunk/py/scripts/addons/io_import_images_as_planes.py	2012-07-15 15:40:39 UTC (rev 3627)
+++ trunk/py/scripts/addons/io_import_images_as_planes.py	2012-07-16 03:00:41 UTC (rev 3628)
@@ -524,11 +524,13 @@
 
         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 @@
 
         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 @@
             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



More information about the Bf-extensions-cvs mailing list