Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-04-29 18:33:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-29 18:33:08 +0300
commit5cdeae2105184b9e3794b9247d718c4c48958ae8 (patch)
tree8de1a5a76789c5465673d3dc272e6db74995dc8c /release
parente84735de45db2e9571ef07b8f7e6cccf916d5b17 (diff)
UI: show basic sculpt options in topbar
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 365dbf3a9a8..4cf302e1c93 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -140,9 +140,12 @@ class TOPBAR_HT_lower_bar(Header):
# TODO(campbell): editing options should be after active tool options
# (obviously separated for from the users POV)
+ draw_fn = getattr(_draw_left_context_mode, mode, None)
+ if draw_fn is not None:
+ draw_fn(context, layout)
if mode == 'SCULPT':
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context="", category="")
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".dummy", category="")
elif mode == 'PAINT_VERTEX':
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context="", category="")
elif mode == 'PAINT_WEIGHT':
@@ -175,6 +178,19 @@ class TOPBAR_HT_lower_bar(Header):
)
+class _draw_left_context_mode:
+ @staticmethod
+ def SCULPT(context, layout):
+ brush = context.tool_settings.sculpt.brush
+ if brush is None:
+ return
+
+ from .properties_paint_common import UnifiedPaintPanel
+
+ UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", icon='LOCKED', slider=True, text="Radius")
+ UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", icon='LOCKED', slider=True, text="Strength")
+ layout.prop(brush, "direction", expand=True)
+
class TOPBAR_PT_redo(Panel):
bl_label = "Redo"
bl_space_type = 'TOPBAR'