[Bf-blender-cvs] [e144af1f7cd] master: GPencil: Provide Option for Fill in Material Popover

Kevin C. Burke noreply at git.blender.org
Tue Jan 17 15:45:06 CET 2023


Commit: e144af1f7cd3e0bf4f3f3ddf4810300afb916ac2
Author: Kevin C. Burke
Date:   Tue Jan 17 15:43:07 2023 +0100
Branches: master
https://developer.blender.org/rBe144af1f7cd3e0bf4f3f3ddf4810300afb916ac2

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

===================================================================

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py

===================================================================

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



More information about the Bf-blender-cvs mailing list