[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1455] trunk/py/scripts/addons/ render_povray/render.py: Fixed: Background gradient to work with empty texture slots.

Maurice Raybaud mauriceraybaud at hotmail.fr
Thu Jan 20 14:56:21 CET 2011


Revision: 1455
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1455
Author:   mauriceraybaud
Date:     2011-01-20 13:56:20 +0000 (Thu, 20 Jan 2011)
Log Message:
-----------
Fixed: Background gradient to work with empty texture slots.

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	2011-01-20 09:32:59 UTC (rev 1454)
+++ trunk/py/scripts/addons/render_povray/render.py	2011-01-20 13:56:20 UTC (rev 1455)
@@ -1233,7 +1233,8 @@
             worldTexCount=0
             #For Background image textures
             for t in world.texture_slots: #risk to write several sky_spheres but maybe ok.
-                worldTexCount+=1
+                if t and t.texture.type is not None:
+                    worldTexCount+=1
                 if t and t.texture.type == 'IMAGE': #and t.use: #No enable checkbox for world textures yet (report it?)
                     image_filename  = path_image(t.texture.image.filepath)
                     if t.texture.image.filepath != image_filename: t.texture.image.filepath = image_filename



More information about the Bf-extensions-cvs mailing list