[Bf-blender-cvs] [39b0ac43ccf] greasepencil-object: UI: MOve topbar panels to Properties

Antonio Vazquez noreply at git.blender.org
Thu Jun 14 19:30:54 CEST 2018


Commit: 39b0ac43ccf86d232de619f3ed86190d83f5bed5
Author: Antonio Vazquez
Date:   Thu Jun 14 19:30:46 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB39b0ac43ccf86d232de619f3ed86190d83f5bed5

UI: MOve topbar panels to Properties

WIP: Still some issues pending.

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	release/scripts/startup/bl_ui/space_topbar.py
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/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 0f203e7f3a6..2d09296b00c 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -294,6 +294,7 @@ class GreasePencilStrokeSculptPanel:
 
 class GreasePencilAppearancePanel:
     bl_label = "Brush Appearance"
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index ce9d244084b..675e97add17 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -131,14 +131,6 @@ class TOPBAR_HT_lower_bar(Header):
             pass
         elif mode == 'PARTICLE':
             layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".paint_common", category="")
-        elif mode == 'GPENCIL_PAINT':
-            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_paint", category="")
-        elif mode == 'GPENCIL_EDIT':
-            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_edit", category="")
-        elif mode == 'GPENCIL_SCULPT':
-            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_sculpt", category="")
-        elif mode == 'GPENCIL_WEIGHT':
-            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_weight", category="")
 
     def draw_center(self, context):
         pass
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 14a0b9e3956..43419dfcc5c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -79,19 +79,6 @@ class VIEW3D_HT_header(Header):
             ob = context.active_object
             gpd = context.gpencil_data
 
-            if gpd.is_stroke_paint_mode:
-                layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_paint",
-                                 category="")
-            elif gpd.use_stroke_edit_mode:
-                layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_edit",
-                                 category="")
-            elif gpd.is_stroke_sculpt_mode:
-                layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_sculpt",
-                                 category="")
-            elif gpd.is_stroke_weight_mode:
-                layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".greasepencil_weight",
-                                 category="")
-
             if gpd.is_stroke_paint_mode:
                 row = layout.row()
                 row.prop(tool_settings, "gpencil_stroke_placement_view3d", text='')
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index e4f80cd2a33..8d69761c8be 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1356,7 +1356,6 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
 # Grease Pencil drawing brushes
 class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
     bl_context = ".greasepencil_paint"
-    bl_category = "Tools"
     bl_label = "Drawing Brushes"
 
     @classmethod
@@ -1443,7 +1442,6 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
 # Grease Pencil drawing brushes options
 class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
     bl_context = ".greasepencil_paint"
-    bl_category = "Tools"
     bl_label = "Options"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -1509,7 +1507,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
 # Grease Pencil drawingcurves
 class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel):
     bl_context = ".greasepencil_paint"
-    bl_category = "Tools"
     bl_label = "Brush Curves"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -1667,19 +1664,16 @@ class VIEW3D_PT_tools_grease_pencil_weight_tools(Panel):
 # Grease Pencil Brush Appeareance (one for each mode)
 class VIEW3D_PT_tools_grease_pencil_paint_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
     bl_context = ".greasepencil_paint"
-    bl_category = "Tools"
     bl_label = "Brush Appearance"
 
 
 class VIEW3D_PT_tools_grease_pencil_sculpt_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
     bl_context = ".greasepencil_sculpt"
-    bl_category = "Tools"
     bl_label = "Brush Appearance"
 
 
 class VIEW3D_PT_tools_grease_pencil_weight_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
     bl_context = ".greasepencil_weight"
-    bl_category = "Tools"
     bl_label = "Brush Appearance"
 
 # Grease Pencil Animation Tools



More information about the Bf-blender-cvs mailing list