[Bf-blender-cvs] [fed8030] einteriores: E-Interiores: Hide UI when debug is -37

Dalai Felinto noreply at git.blender.org
Tue Apr 19 04:24:46 CEST 2016


Commit: fed803005423b86bf9714ef61583db15a3da4be9
Author: Dalai Felinto
Date:   Mon Feb 29 18:21:11 2016 -0300
Branches: einteriores
https://developer.blender.org/rBfed803005423b86bf9714ef61583db15a3da4be9

E-Interiores: Hide UI when debug is -37

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index cbcdb86..9bea42c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -28,6 +28,9 @@ class VIEW3D_HT_header(Header):
     bl_space_type = 'VIEW_3D'
 
     def draw(self, context):
+        if bpy.app.debug_value == -37:
+            return
+
         layout = self.layout
 
         view = context.space_data
@@ -3027,6 +3030,9 @@ class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
 
     # NOTE: this is just a wrapper around the generic GP Panel
 
+    @classmethod
+    def poll(cls, context):
+        return bpy.app.debug_value != -37
 
 class VIEW3D_PT_view3d_properties(Panel):
     bl_space_type = 'VIEW_3D'
@@ -3035,6 +3041,9 @@ class VIEW3D_PT_view3d_properties(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         view = context.space_data
         return (view)
 
@@ -3083,6 +3092,9 @@ class VIEW3D_PT_view3d_cursor(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         view = context.space_data
         return (view is not None)
 
@@ -3100,6 +3112,9 @@ class VIEW3D_PT_view3d_name(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         return (context.space_data and context.active_object)
 
     def draw(self, context):
@@ -3126,6 +3141,9 @@ class VIEW3D_PT_view3d_display(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         view = context.space_data
         return (view)
 
@@ -3188,6 +3206,9 @@ class VIEW3D_PT_view3d_stereo(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         scene = context.scene
 
         multiview = scene.render.use_multiview
@@ -3225,6 +3246,10 @@ class VIEW3D_PT_view3d_shading(Panel):
     bl_region_type = 'UI'
     bl_label = "Shading"
 
+    @classmethod
+    def poll(cls, context):
+        return bpy.app.debug_value != -37
+
     def draw(self, context):
         layout = self.layout
 
@@ -3278,6 +3303,9 @@ class VIEW3D_PT_view3d_motion_tracking(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         view = context.space_data
         return (view)
 
@@ -3308,6 +3336,9 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         # The active object check is needed because of local-mode
         return (context.active_object and (context.mode == 'EDIT_MESH'))
 
@@ -3375,6 +3406,9 @@ class VIEW3D_PT_view3d_meshstatvis(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         # The active object check is needed because of local-mode
         return (context.active_object and (context.mode == 'EDIT_MESH'))
 
@@ -3421,6 +3455,9 @@ class VIEW3D_PT_view3d_curvedisplay(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         editmesh = context.mode == 'EDIT_CURVE'
         return (editmesh)
 
@@ -3442,6 +3479,10 @@ class VIEW3D_PT_background_image(Panel):
     bl_label = "Background Images"
     bl_options = {'DEFAULT_CLOSED'}
 
+    @classmethod
+    def poll(cls, context):
+        return bpy.app.debug_value != -37
+
     def draw_header(self, context):
         view = context.space_data
 
@@ -3551,6 +3592,9 @@ class VIEW3D_PT_transform_orientations(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         view = context.space_data
         return (view)
 
@@ -3578,6 +3622,9 @@ class VIEW3D_PT_etch_a_ton(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         scene = context.space_data
         ob = context.active_object
         return scene and ob and ob.type == 'ARMATURE' and ob.mode == 'EDIT'
@@ -3648,6 +3695,9 @@ class VIEW3D_PT_context_properties(Panel):
 
     @classmethod
     def poll(cls, context):
+        if bpy.app.debug_value == -37:
+            return False
+
         import rna_prop_ui
         member = cls._active_context_member(context)
 
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 7748618..b4995d7 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -36,6 +36,10 @@ class View3DPanel:
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
 
+    @classmethod
+    def poll(cls, context):
+        return bpy.app.debug_value != -37
+
 
 # **************** standard tool clusters ******************
 
@@ -1947,11 +1951,19 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
 class VIEW3D_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
     bl_space_type = 'VIEW_3D'
 
+    @classmethod
+    def poll(cls, context):
+        return bpy.app.debug_value != -37
+
 
 # Grease Pencil stroke editing tools
 class VIEW3D_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
     bl_space_type = 'VIEW_3D'
 
+    @classmethod
+    def poll(cls, context):
+        return bpy.app.debug_value != -37
+
 
 # Grease Pencil stroke sculpting tools
 class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel):




More information about the Bf-blender-cvs mailing list