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-11-13 12:59:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-13 12:59:25 +0300
commitf4d4f502122aaf7df65cc8d3beeb86a9f444712b (patch)
treed0324506741620fccf3366090511f83dadd546b9 /release/scripts/startup/bl_ui/space_topbar.py
parent4503c96a175596bf5c0a52508a162dd78bcb9cdc (diff)
UI: move gpencil paint into topbar only layout
Tool properties were duplicating UI elements.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_topbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index ac6bd4002ca..5d2e98bdd8a 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -369,6 +369,39 @@ class _draw_left_context_mode:
draw_color_selector()
@staticmethod
+ def GPENCIL_SCULPT(context, layout, tool):
+ if (tool is None) or (not tool.has_datablock):
+ return
+ tool_settings = context.tool_settings
+ settings = tool_settings.gpencil_sculpt
+ tool = settings.sculpt_tool
+ brush = settings.brush
+
+ layout.prop(brush, "size", slider=True)
+
+ row = layout.row(align=True)
+ row.prop(brush, "strength", slider=True)
+ row.prop(brush, "use_pressure_strength", text="")
+
+ if tool in {'THICKNESS', 'STRENGTH', 'PINCH', 'TWIST'}:
+ row.separator()
+ row.prop(brush, "direction", expand=True, text="")
+
+ @staticmethod
+ def GPENCIL_WEIGHT(context, layout, tool):
+ if (tool is None) or (not tool.has_datablock):
+ return
+ tool_settings = context.tool_settings
+ settings = tool_settings.gpencil_sculpt
+ brush = settings.brush
+
+ layout.prop(brush, "size", slider=True)
+
+ row = layout.row(align=True)
+ row.prop(brush, "strength", slider=True)
+ row.prop(brush, "use_pressure_strength", text="")
+
+ @staticmethod
def PARTICLE(context, layout, tool):
# See: 'VIEW3D_PT_tools_brush', basically a duplicate
settings = context.tool_settings.particle_edit