[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1134] trunk/py/scripts/addons/ render_povray/render.py: Added HEMI lamps to shadow and attenuation exceptions since they don' t have such arguments.

Maurice Raybaud mauriceraybaud at hotmail.fr
Fri Oct 29 01:48:08 CEST 2010


Revision: 1134
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1134
Author:   mauriceraybaud
Date:     2010-10-29 01:48:08 +0200 (Fri, 29 Oct 2010)

Log Message:
-----------
Added HEMI lamps to shadow and attenuation exceptions since they don't have such arguments.

Modified Paths:
--------------
    trunk/py/scripts/addons/render_povray/render.py

Modified: trunk/py/scripts/addons/render_povray/render.py
===================================================================
--- trunk/py/scripts/addons/render_povray/render.py	2010-10-28 23:16:31 UTC (rev 1133)
+++ trunk/py/scripts/addons/render_povray/render.py	2010-10-28 23:48:08 UTC (rev 1134)
@@ -577,10 +577,12 @@
                     file.write('\tadaptive 1\n')
                     file.write('\tjitter\n')
 
-            if lamp.shadow_method == 'NOSHADOW':
+            if lamp.type == 'HEMI':#HEMI never has any shadow attribute
                 file.write('\tshadowless\n')
+            elif lamp.shadow_method == 'NOSHADOW':
+                    file.write('\tshadowless\n')
 
-            if lamp.type != 'SUN' and lamp.type!='AREA':#Sun shouldn't be attenuated. and area lights have no falloff attribute so they are put to type 2 attenuation a little higher above.
+            if lamp.type != 'SUN' and lamp.type!='AREA' and lamp.type!='HEMI':#Sun shouldn't be attenuated. Hemi and area lights have no falloff attribute so they are put to type 2 attenuation a little higher above.
                 file.write('\tfade_distance %.6f\n' % (lamp.distance / 5) )
                 if lamp.falloff_type == 'INVERSE_SQUARE':
                     file.write('\tfade_power %d\n' % 2) # Use blenders lamp quad equivalent




More information about the Bf-extensions-cvs mailing list