From e144af1f7cd3e0bf4f3f3ddf4810300afb916ac2 Mon Sep 17 00:00:00 2001 From: "Kevin C. Burke" Date: Tue, 17 Jan 2023 15:43:07 +0100 Subject: [PATCH] GPencil: Provide Option for Fill in Material Popover The Grease Pencil Material Popover currently has a color picker for the Stroke of a Material using Solid style, but not one for a Fill using Solid style. With the default Grease Pencil Materials, the current popover only shows the Stroke color for the grey "Solid Fill" material (which doesn't have its Stroke enabled) instead of the more useful Fill color. This patch shows a Stroke color picker when the Material has Stroke enabled and the style is Solid. This is the same for the Fill. Reviewed By: antoniov, mendio Differential Revision: https://developer.blender.org/D17004 --- .../startup/bl_ui/properties_grease_pencil_common.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 e0f5d65db16..1403bb0d07e 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -565,9 +565,11 @@ class GreasePencilMaterialsPanel: if is_view3d and ma is not None and ma.grease_pencil is not None: gpcolor = ma.grease_pencil - if gpcolor.stroke_style == 'SOLID': - row = layout.row() - row.prop(gpcolor, "color", text="Stroke Color") + col = layout.column(align=True) + if gpcolor.show_stroke and gpcolor.stroke_style == 'SOLID': + col.prop(gpcolor, "color", text="Stroke Color") + if gpcolor.show_fill and gpcolor.fill_style == 'SOLID': + col.prop(gpcolor, "fill_color", text="Fill Color") else: space = context.space_data