From 05a3072e7bf416b232ac8593a07939c1cbd7c1a1 Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Thu, 2 Oct 2025 10:54:55 +0200 Subject: [PATCH] Cleanup: UI: Remove duplicate Grease Pencil vertex paint code Pull Request: https://projects.blender.org/blender/blender/pulls/147096 --- .../startup/bl_ui/properties_paint_common.py | 22 ------------------- scripts/startup/bl_ui/space_view3d_toolbar.py | 4 ++-- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/scripts/startup/bl_ui/properties_paint_common.py b/scripts/startup/bl_ui/properties_paint_common.py index 14fecad93d0..f51315fee6e 100644 --- a/scripts/startup/bl_ui/properties_paint_common.py +++ b/scripts/startup/bl_ui/properties_paint_common.py @@ -1793,28 +1793,6 @@ def brush_basic_grease_pencil_paint_settings(layout, context, brush, props, *, c layout.prop(gp_settings, "use_active_layer_only") -def brush_basic_gpencil_vertex_settings(layout, context, brush, *, compact=False): - del compact # UNUSED. - gp_settings = brush.gpencil_settings - ups = context.tool_settings.gpencil_vertex_paint.unified_paint_settings - brush_prop_owner = ups if ups.use_unified_size else brush - - # Brush details - row = layout.row(align=True) - row.prop(brush, "size", text="Size") - row.prop(brush, "use_pressure_size", text="", icon='STYLUS_PRESSURE') - - if brush.gpencil_vertex_brush_type in {'DRAW', 'BLUR', 'SMEAR'}: - row = layout.row(align=True) - row.prop(brush_prop_owner, "strength", slider=True) - row.prop(brush, "use_pressure_strength", text="", icon='STYLUS_PRESSURE') - row.prop(ups, "use_unified_strength", text="", icon='BRUSHES_ALL') - - if brush.gpencil_vertex_brush_type in {'DRAW', 'REPLACE'}: - row = layout.row(align=True) - row.prop(gp_settings, "vertex_mode", text="Mode") - - def brush_basic_grease_pencil_weight_settings(layout, context, brush, *, compact=False): UnifiedPaintPanel.prop_unified( layout, diff --git a/scripts/startup/bl_ui/space_view3d_toolbar.py b/scripts/startup/bl_ui/space_view3d_toolbar.py index 39ae5da053d..b95945817cf 100644 --- a/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1629,9 +1629,9 @@ class VIEW3D_PT_tools_grease_pencil_vertex_paint_settings(Panel, View3DPanel, Gr if not self.is_popover: from bl_ui.properties_paint_common import ( - brush_basic_gpencil_vertex_settings, + brush_basic_grease_pencil_vertex_settings, ) - brush_basic_gpencil_vertex_settings(layout, context, brush) + brush_basic_grease_pencil_vertex_settings(layout, context, brush) class VIEW3D_PT_tools_grease_pencil_brush_vertex_color(View3DPanel, Panel):