== Clay Render ==
authorFabio Russo <ruesp83@libero.it>
Tue, 4 Jan 2011 17:28:31 +0000 (17:28 +0000)
committerFabio Russo <ruesp83@libero.it>
Tue, 4 Jan 2011 17:28:31 +0000 (17:28 +0000)
* Message to warn that the clay render is enabled!

render_clay.py

index 489df6ae5140bc53fb5fd252d19a518963262bab..0777fbadfcd01eccdca41b9a4e4585a6158c363f 100644 (file)
@@ -181,6 +181,11 @@ def draw_clay_options(self, context):
     layout.prop(cm, "Mat_Clay", text="Clay")
 
 
+def draw_clay_warning(self, context):
+    if not bpy.types.Scene.Clay:
+        self.layout.label("Render Clay Enabled", "ERROR")
+
+
 def register():
     bpy.types.Scene.Clay = BoolProperty(
     name='Clay Render',
@@ -199,6 +204,7 @@ def register():
 
     bpy.types.RENDER_PT_render.prepend(draw_clay_render)
     bpy.types.MATERIAL_PT_options.append(draw_clay_options)
+    bpy.types.INFO_HT_header.append(draw_clay_warning)
 
 
 def unregister():
@@ -210,6 +216,7 @@ def unregister():
     del bpy.types.Material.Mat_Clay
     bpy.types.RENDER_PT_render.remove(draw_clay_render)
     bpy.types.MATERIAL_PT_options.remove(draw_clay_options)
+    bpy.types.INFO_HT_header.remove(draw_clay_warning)
 
 
 if __name__ == "__main__":