[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1306] trunk/py/scripts/addons/ render_povray/ui.py: objects with no materials were raising errors.

Campbell Barton ideasman42 at gmail.com
Wed Dec 22 23:16:34 CET 2010


Revision: 1306
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1306
Author:   campbellbarton
Date:     2010-12-22 23:16:34 +0100 (Wed, 22 Dec 2010)

Log Message:
-----------
objects with no materials were raising errors.

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

Modified: trunk/py/scripts/addons/render_povray/ui.py
===================================================================
--- trunk/py/scripts/addons/render_povray/ui.py	2010-12-22 21:42:28 UTC (rev 1305)
+++ trunk/py/scripts/addons/render_povray/ui.py	2010-12-22 22:16:34 UTC (rev 1306)
@@ -104,7 +104,7 @@
     def poll(cls, context):
         mat = context.material
         rd = context.scene.render
-        return (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES)
+        return mat and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES)
 
 ########################################MR######################################
 class MATERIAL_PT_povray_mirrorIOR(MaterialButtonsPanel, bpy.types.Panel):




More information about the Bf-extensions-cvs mailing list