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 f5b95981d66..3020f71d1e7 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -259,6 +259,33 @@ class GreasePencilStrokeSculptPanel: layout.prop(brush, "use_falloff") + if tool in {'THICKNESS', 'PINCH', 'TWIST'}: + col = layout.column() + col.separator() + col.row().prop(brush, "direction", expand=True) + + + +class GreasePencilSculptOptionsPanel: + bl_label = "Sculpt Strokes" + + @classmethod + def poll(cls, context): + settings = context.tool_settings.gpencil_sculpt + tool = settings.tool + + return bool(tool in {'SMOOTH', 'RANDOMIZE', 'SMOOTH'}) + + @staticmethod + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + settings = context.tool_settings.gpencil_sculpt + tool = settings.tool + brush = settings.brush + if tool in {'SMOOTH', 'RANDOMIZE'}: layout.prop(settings, "affect_position", text="Affect Position") layout.prop(settings, "affect_strength", text="Affect Strength") @@ -269,9 +296,6 @@ class GreasePencilStrokeSculptPanel: layout.prop(settings, "affect_uv", text="Affect UV") - if tool in {'THICKNESS', 'PINCH', 'TWIST'}: - layout.prop(brush, "direction", expand=True) - # GP Object Tool Settings class GreasePencilAppearancePanel: diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 300cc2154b1..2e197b4ec5b 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -22,6 +22,7 @@ from bpy.types import Menu, Panel, UIList from .properties_grease_pencil_common import ( GreasePencilStrokeEditPanel, GreasePencilStrokeSculptPanel, + GreasePencilSculptOptionsPanel, GreasePencilAppearancePanel, ) from .properties_paint_common import ( @@ -1703,7 +1704,7 @@ class VIEW3D_PT_tools_grease_pencil_interpolate(Panel): class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, View3DPanel, Panel): bl_context = ".greasepencil_sculpt" bl_category = "Tools" - bl_label = "Sculpt Strokes" + bl_label = "Brush" # Grease Pencil weight painting tools @@ -1743,6 +1744,12 @@ class VIEW3D_PT_tools_grease_pencil_sculpt_appearance(GreasePencilAppearancePane bl_label = "Appearance" +class VIEW3D_PT_tools_grease_pencil_sculpt_options(GreasePencilSculptOptionsPanel, View3DPanel, Panel): + bl_context = ".greasepencil_sculpt" + bl_label = "Sculpt Strokes" + bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_sculpt' + + class VIEW3D_PT_tools_grease_pencil_weight_appearance(GreasePencilAppearancePanel, View3DPanel, Panel): bl_context = ".greasepencil_weight" bl_label = "Appearance" @@ -1796,6 +1803,7 @@ classes = ( VIEW3D_PT_tools_grease_pencil_sculpt, VIEW3D_PT_tools_grease_pencil_weight_paint, VIEW3D_PT_tools_grease_pencil_paint_appearance, + VIEW3D_PT_tools_grease_pencil_sculpt_options, VIEW3D_PT_tools_grease_pencil_sculpt_appearance, VIEW3D_PT_tools_grease_pencil_weight_appearance, VIEW3D_PT_tools_grease_pencil_interpolate,