From 658ee8d1875f85d14d2a185d4270af3fdba0feed Mon Sep 17 00:00:00 2001 From: YimingWu Date: Wed, 19 Jun 2024 10:40:59 +0800 Subject: [PATCH 1/2] Fix #123396: GPencil: Show brush options for GPv3 Some brush options aren't shown in GPv3. Now fixed. --- .../bl_ui/properties_grease_pencil_common.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/startup/bl_ui/properties_grease_pencil_common.py b/scripts/startup/bl_ui/properties_grease_pencil_common.py index 777d84dd3f6..2d1abef827c 100644 --- a/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -98,13 +98,13 @@ class GreasePencilDisplayPanel: layout.use_property_decorate = False tool_settings = context.tool_settings - if context.mode == 'PAINT_GPENCIL': + if context.mode == 'PAINT_GPENCIL' or context.mode == 'PAINT_GREASE_PENCIL': settings = tool_settings.gpencil_paint - elif context.mode == 'SCULPT_GPENCIL': + elif context.mode == 'SCULPT_GPENCIL' or context.mode == 'SCULPT_GREASE_PENCIL': settings = tool_settings.gpencil_sculpt_paint elif context.mode == 'WEIGHT_GPENCIL' or context.mode == 'WEIGHT_GREASE_PENCIL': settings = tool_settings.gpencil_weight_paint - elif context.mode == 'VERTEX_GPENCIL': + elif context.mode == 'VERTEX_GPENCIL' or context.mode == 'VERTEX_GREASE_PENCIL': settings = tool_settings.gpencil_vertex_paint brush = settings.brush gp_settings = brush.gpencil_settings @@ -115,7 +115,7 @@ class GreasePencilDisplayPanel: row.use_property_split = False row.prop(settings, "show_brush", text="Display Cursor") - if ob.mode == 'PAINT_GPENCIL': + if ob.mode == 'PAINT_GPENCIL' or ob.mode == 'PAINT_GREASE_PENCIL': if self.is_popover: row = layout.row(align=True) row.prop(settings, "show_brush", text="Display Cursor") @@ -125,7 +125,7 @@ class GreasePencilDisplayPanel: row.active = settings.show_brush row.prop(gp_settings, "show_lasso", text="Show Fill Color While Drawing") - elif ob.mode == 'SCULPT_GPENCIL': + elif ob.mode == 'SCULPT_GPENCIL' or ob.mode == 'SCULPT_GREASE_PENCIL': col = layout.column(align=True) col.active = settings.show_brush @@ -133,13 +133,13 @@ class GreasePencilDisplayPanel: if brush.gpencil_sculpt_tool in {'THICKNESS', 'STRENGTH', 'PINCH', 'TWIST'}: col.prop(brush, "cursor_color_subtract", text="Inverse Color") - elif ob.mode == 'WEIGHT_GPENCIL': + elif ob.mode == 'WEIGHT_GPENCIL' or ob.mode == 'WEIGHT_GREASE_PENCIL': col = layout.column(align=True) col.active = settings.show_brush col.prop(brush, "cursor_color_add", text="Cursor Color") - elif ob.mode == 'VERTEX_GPENCIL': + elif ob.mode == 'VERTEX_GPENCIL' or ob.mode == 'VERTEX_GREASE_PENCIL': row = layout.row(align=True) row.prop(settings, "show_brush", text="Display Cursor") -- 2.30.2 From 477e26a3aae46a7b69d7cb222b7c8d3ecc4b76ec Mon Sep 17 00:00:00 2001 From: YimingWu Date: Mon, 24 Jun 2024 10:08:13 +0800 Subject: [PATCH 2/2] Remove `VERTEX_GREASE_PENCIL` --- scripts/startup/bl_ui/properties_grease_pencil_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/startup/bl_ui/properties_grease_pencil_common.py b/scripts/startup/bl_ui/properties_grease_pencil_common.py index 2d1abef827c..92940c66bd3 100644 --- a/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -104,7 +104,7 @@ class GreasePencilDisplayPanel: settings = tool_settings.gpencil_sculpt_paint elif context.mode == 'WEIGHT_GPENCIL' or context.mode == 'WEIGHT_GREASE_PENCIL': settings = tool_settings.gpencil_weight_paint - elif context.mode == 'VERTEX_GPENCIL' or context.mode == 'VERTEX_GREASE_PENCIL': + elif context.mode == 'VERTEX_GPENCIL': settings = tool_settings.gpencil_vertex_paint brush = settings.brush gp_settings = brush.gpencil_settings @@ -139,7 +139,7 @@ class GreasePencilDisplayPanel: col.prop(brush, "cursor_color_add", text="Cursor Color") - elif ob.mode == 'VERTEX_GPENCIL' or ob.mode == 'VERTEX_GREASE_PENCIL': + elif ob.mode == 'VERTEX_GPENCIL': row = layout.row(align=True) row.prop(settings, "show_brush", text="Display Cursor") -- 2.30.2