[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54190] trunk/blender/intern/cycles/ blender/addon/ui.py: Cycles: collapse preview render panel by default.

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Jan 29 18:30:26 CET 2013


Revision: 54190
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54190
Author:   blendix
Date:     2013-01-29 17:30:26 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
Cycles: collapse preview render panel by default. It's a matter of personal
preference, but it slows down 3D view rendering to have two renders going so
I rather disable it by default.

Modified Paths:
--------------
    trunk/blender/intern/cycles/blender/addon/ui.py

Modified: trunk/blender/intern/cycles/blender/addon/ui.py
===================================================================
--- trunk/blender/intern/cycles/blender/addon/ui.py	2013-01-29 17:15:51 UTC (rev 54189)
+++ trunk/blender/intern/cycles/blender/addon/ui.py	2013-01-29 17:30:26 UTC (rev 54190)
@@ -522,6 +522,19 @@
     return True
 
 
+class CyclesLamp_PT_preview(CyclesButtonsPanel, Panel):
+    bl_label = "Preview"
+    bl_context = "data"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    @classmethod
+    def poll(cls, context):
+        return context.lamp and CyclesButtonsPanel.poll(context)
+
+    def draw(self, context):
+        self.layout.template_preview(context.lamp)
+
+
 class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
     bl_label = "Lamp"
     bl_context = "data"
@@ -606,6 +619,19 @@
         col.prop(lamp, "show_cone")
 
 
+class CyclesWorld_PT_preview(CyclesButtonsPanel, Panel):
+    bl_label = "Preview"
+    bl_context = "world"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    @classmethod
+    def poll(cls, context):
+        return context.world and CyclesButtonsPanel.poll(context)
+
+    def draw(self, context):
+        self.layout.template_preview(context.world)
+
+
 class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
     bl_label = "Surface"
     bl_context = "world"
@@ -692,6 +718,19 @@
             sub.prop(cworld, "samples")
 
 
+class CyclesMaterial_PT_preview(CyclesButtonsPanel, Panel):
+    bl_label = "Preview"
+    bl_context = "material"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    @classmethod
+    def poll(cls, context):
+        return context.material and CyclesButtonsPanel.poll(context)
+
+    def draw(self, context):
+        self.layout.template_preview(context.material)
+
+
 class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
     bl_label = "Surface"
     bl_context = "material"
@@ -1175,9 +1214,6 @@
         types.PARTICLE_PT_force_fields,
         types.PARTICLE_PT_vertexgroups,
         types.PARTICLE_PT_custom_props,
-        types.MATERIAL_PT_preview,
-        types.DATA_PT_preview,
-        types.WORLD_PT_preview,
         )
 
 




More information about the Bf-blender-cvs mailing list