diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-09-16 14:09:12 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-09-17 13:30:13 +0300 |
commit | 742268c50bd4836e2181f74daca2811364ae20ac (patch) | |
tree | 7f40338bdbb02e1f67b356b74c9031b598334b4b /release | |
parent | 0621d162f0847ab9bb9d7644acd4d62f5d37de6e (diff) |
GPencil: Move Gap Closure option to separated subpanel
Also removed leak size
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 88add2a8f3b..ecc72e1bbb8 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1606,23 +1606,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel): row.prop(gp_settings, "fill_layer_mode", text="Layers") col.separator() - row = col.row(align=True) - row.prop(gp_settings, "fill_extend_mode") - - col.separator() - row = col.row(align=True) - row.prop(gp_settings, "extend_stroke_factor") - row.prop( - gp_settings, - "show_fill_extend", - icon='HIDE_OFF' if gp_settings.show_fill_extend else 'HIDE_ON', - text="", - ) - - col.separator() - col.prop(gp_settings, "fill_leak", text="Leak Size") - - col.separator() col.prop(gp_settings, "fill_simplify_level", text="Simplify") if gp_settings.fill_draw_mode != 'STROKE': col = layout.column(align=False, heading="Ignore Transparent") @@ -1882,6 +1865,37 @@ class VIEW3D_PT_tools_grease_pencil_brush_paint_falloff(GreasePencilBrushFalloff return (settings and settings.brush and settings.brush.curve and gptool == 'TINT') +class VIEW3D_PT_tools_grease_pencil_brush_gap_closure(View3DPanel, Panel): + bl_context = ".greasepencil_paint" + bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_advanced' + bl_label = "Gap Closure" + bl_category = "Tool" + + @classmethod + def poll(cls, context): + brush = context.tool_settings.gpencil_paint.brush + return brush is not None and brush.gpencil_tool == 'FILL' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + tool_settings = context.tool_settings + brush = tool_settings.gpencil_paint.brush + gp_settings = brush.gpencil_settings + + col = layout.column() + + col.prop(gp_settings, "extend_stroke_factor", text="Size") + row = col.row(align=True) + row.enabled = gp_settings.extend_stroke_factor > 0 + row.prop(gp_settings, "fill_extend_mode", text="Mode") + row = col.row(align=True) + row.enabled = gp_settings.extend_stroke_factor > 0 + row.prop(gp_settings, "show_fill_extend", text="Visual Aids") + + # Grease Pencil stroke sculpting tools class GreasePencilSculptPanel: bl_context = ".greasepencil_sculpt" @@ -2434,6 +2448,7 @@ classes = ( VIEW3D_PT_tools_grease_pencil_brush_post_processing, VIEW3D_PT_tools_grease_pencil_brush_random, VIEW3D_PT_tools_grease_pencil_brush_stabilizer, + VIEW3D_PT_tools_grease_pencil_brush_gap_closure, VIEW3D_PT_tools_grease_pencil_paint_appearance, VIEW3D_PT_tools_grease_pencil_sculpt_select, VIEW3D_PT_tools_grease_pencil_sculpt_settings, |