diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-30 17:06:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-30 17:08:15 +0300 |
commit | 9aef2d961da7668e6984719856832f6136a2a8ce (patch) | |
tree | 991e356043957c2bb58870e6a453bf8caec31345 /release/scripts/startup/bl_ui/space_topbar.py | |
parent | cbe57acddf9554d11988718758096f9d847e9c95 (diff) |
UI: add weight paint brushes to toolbar
Diffstat (limited to 'release/scripts/startup/bl_ui/space_topbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 9c0acfd7a6a..458dc571bbb 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -150,7 +150,8 @@ class TOPBAR_HT_lower_bar(Header): layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".dummy", 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=".dummy", category="") + layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context="", 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="") @@ -203,6 +204,18 @@ class _draw_left_context_mode: UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius") UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength") + def PAINT_WEIGHT(context, layout): + brush = context.tool_settings.weight_paint.brush + if brush is None: + return + + from .properties_paint_common import UnifiedPaintPanel + + layout.prop(brush, "weight") + UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius") + UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength") + + class TOPBAR_PT_redo(Panel): bl_label = "Redo" bl_space_type = 'TOPBAR' |