[Bf-blender-cvs] [3b9554ce9d6] blender2.8: UI: share common paint panels between all modes
Campbell Barton
noreply at git.blender.org
Mon Apr 30 17:00:02 CEST 2018
Commit: 3b9554ce9d6fc232fd4a3e28b128d9b93a7073bd
Author: Campbell Barton
Date: Mon Apr 30 16:59:16 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB3b9554ce9d6fc232fd4a3e28b128d9b93a7073bd
UI: share common paint panels between all modes
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
M release/scripts/startup/bl_ui/space_topbar.py
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 2235b03c20e..fc8320ac309 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -774,10 +774,10 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_vertex_paint.generate_from_brushes,
],
'PAINT_WEIGHT': [
- *_tools_select,
+ _defs_weight_paint.generate_from_brushes,
# TODO, override brush events
- _defs_weight_paint.generate_from_brushes,
+ *_tools_select,
(
_defs_weight_paint.gradient_linear,
_defs_weight_paint.gradient_radial,
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 04e06ee833b..7a8b2563451 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -145,15 +145,16 @@ class TOPBAR_HT_lower_bar(Header):
draw_fn(context, layout)
if mode == 'SCULPT':
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".dummy", category="")
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".sculpt_mode", category="")
elif mode == 'PAINT_VERTEX':
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".dummy", category="")
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".vertexpaint", category="")
elif mode == 'PAINT_WEIGHT':
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context="", category="")
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".weightpaint", category="")
elif mode == 'PAINT_TEXTURE':
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context="", category="")
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".imagepaint", category="")
elif mode == 'EDIT_ARMATURE':
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 158f032d009..f1569e9df8a 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -259,7 +259,7 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
bl_category = "Tools"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
bl_label = "Brush"
@classmethod
@@ -634,7 +634,7 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
bl_category = "Options"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
bl_label = "Overlay"
@classmethod
@@ -701,7 +701,7 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
bl_category = "Tools"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
bl_label = "Texture"
bl_options = {'DEFAULT_CLOSED'}
@@ -749,7 +749,7 @@ class VIEW3D_PT_tools_mask_texture(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
bl_category = "Tools"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
bl_label = "Stroke"
bl_options = {'DEFAULT_CLOSED'}
@@ -848,7 +848,7 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
bl_category = "Tools"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
bl_label = "Curve"
bl_options = {'DEFAULT_CLOSED'}
@@ -878,7 +878,7 @@ class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
bl_category = "Tools"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
bl_label = "Dyntopo"
bl_options = {'DEFAULT_CLOSED'}
@@ -929,7 +929,7 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
bl_category = "Options"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
bl_label = "Options"
bl_options = {'DEFAULT_CLOSED'}
@@ -963,7 +963,7 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
bl_category = "Tools"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
bl_label = "Symmetry/Lock"
bl_options = {'DEFAULT_CLOSED'}
@@ -1005,7 +1005,7 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_brush_appearance(Panel, View3DPaintPanel):
bl_category = "Options"
- bl_context = ".dummy" # dot on purpose (access from topbar)
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
bl_label = "Appearance"
@classmethod
More information about the Bf-blender-cvs
mailing list