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
This commit is contained in:
Kevin C. Burke 2023-01-17 15:43:07 +01:00 committed by Antonio Vazquez
parent f8328ec172
commit e144af1f7c
1 changed files with 5 additions and 3 deletions

View File

@ -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