[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60072] trunk/blender/release/scripts/ startup/bl_ui/space_view3d.py: 3D View / UI:

Thomas Dinges blender at dingto.org
Thu Sep 12 15:01:37 CEST 2013


Revision: 60072
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60072
Author:   dingto
Date:     2013-09-12 13:01:36 +0000 (Thu, 12 Sep 2013)
Log Message:
-----------
3D View / UI:
* Decouple "Display" panel, into Display and Shading panels, so one of them can be closed when not needed. (Saves some space).

Patch by Sebastian K?\195?\182nig, with tweaks by myself. 

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2013-09-12 12:51:54 UTC (rev 60071)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2013-09-12 13:01:36 UTC (rev 60072)
@@ -2592,19 +2592,6 @@
         subsub.active = scene.unit_settings.system == 'NONE'
         subsub.prop(view, "grid_subdivisions", text="Subdivisions")
 
-        if not scene.render.use_shading_nodes:
-            col = layout.column()
-            col.label(text="Shading:")
-            col.prop(gs, "material_mode", text="")
-            col.prop(view, "show_textured_solid")
-        if view.viewport_shade == 'SOLID':
-            col.prop(view, "use_matcap")
-            if view.use_matcap:
-                col.template_icon_view(view, "matcap_icon")
-        col.prop(view, "show_backface_culling")
-        if obj and obj.mode == 'EDIT' and view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'}:
-            col.prop(view, "show_occlude_wire")
-
         layout.separator()
 
         region = view.region_quadview
@@ -2622,6 +2609,39 @@
             row.prop(region, "use_box_clip")
 
 
+class VIEW3D_PT_view3d_shading(Panel):
+    bl_space_type = 'VIEW_3D'
+    bl_region_type = 'UI'
+    bl_label = "Shading"
+    bl_options = {'DEFAULT_CLOSED'}
+    
+    @classmethod
+    def poll(cls, context):
+        view = context.space_data
+        return (view)
+
+    def draw(self, context):
+        layout = self.layout
+
+        view = context.space_data
+        scene = context.scene
+        gs = scene.game_settings
+        obj = context.object
+
+        col = layout.column()
+
+        if not scene.render.use_shading_nodes:
+            col.prop(gs, "material_mode", text="")
+            col.prop(view, "show_textured_solid")
+        if view.viewport_shade == 'SOLID':
+            col.prop(view, "use_matcap")
+            if view.use_matcap:
+                col.template_icon_view(view, "matcap_icon")
+        col.prop(view, "show_backface_culling")
+        if obj and obj.mode == 'EDIT' and view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'}:
+            col.prop(view, "show_occlude_wire")
+
+
 class VIEW3D_PT_view3d_motion_tracking(Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'




More information about the Bf-blender-cvs mailing list