[Bf-blender-cvs] [ceb40f9c9b7] greasepencil-object: GPencil: Change Popover to use Color header

Antonio Vazquez noreply at git.blender.org
Thu Feb 27 11:38:11 CET 2020


Commit: ceb40f9c9b7ee219a62cb5562147fa011d67f392
Author: Antonio Vazquez
Date:   Thu Feb 27 11:38:00 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rBceb40f9c9b7ee219a62cb5562147fa011d67f392

GPencil: Change Popover to use Color header

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	release/scripts/startup/bl_ui/space_view3d.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 8f97128b280..bc1ee89193f 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -651,6 +651,7 @@ class GreasePencilVertexcolorPanel:
         ob = context.object
 
         if ob:
+
             if tool in {'DRAW', 'FILL'} and is_vertex is False:
                 row = layout.row(align=True)
                 row.prop(gp_settings, "vertex_mode", text="Mode")
@@ -661,6 +662,10 @@ class GreasePencilVertexcolorPanel:
                 row = layout.row(align=True)
                 row.prop(gp_settings, "vertex_mode", text="Mode")
 
+            col = layout.column()
+            col.prop(brush, "color", text="")
+            col.template_color_picker(brush, "color", value_slider=True)
+
             sub_row = layout.row(align=True)
             sub_row.prop(brush, "color", text="")
             sub_row.prop(brush, "secondary_color", text="")
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index dd9594a080d..b8bbe9d1d18 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -437,11 +437,7 @@ class _draw_tool_settings_context_mode:
                 row.prop(settings, "use_vertex_color", text="", expand=True)
                 sub_row = row.row(align=True)
                 sub_row.enabled = settings.use_vertex_color == 'VERTEXCOLOR'
-                sub_row.prop(brush, "color", text="")
-                sub_row.popover(
-                    panel="TOPBAR_PT_gpencil_vertexcolor",
-                    text="",
-                )
+                sub_row.prop_with_popover(brush, "color", text="", panel="TOPBAR_PT_gpencil_vertexcolor")
 
         row = layout.row(align=True)
         tool_settings = context.scene.tool_settings
@@ -453,11 +449,7 @@ class _draw_tool_settings_context_mode:
 
         if context.object and brush.gpencil_tool == 'TINT':
             row.separator(factor=0.4)
-            row.prop(brush, "color", text="")
-            row.popover(
-                panel="TOPBAR_PT_gpencil_vertexcolor",
-                text="",
-            )
+            row.prop_with_popover(brush, "color", text="", panel="TOPBAR_PT_gpencil_vertexcolor")
 
         from bl_ui.properties_paint_common import (
             brush_basic_gpencil_paint_settings,
@@ -509,12 +501,7 @@ class _draw_tool_settings_context_mode:
 
         if brush.gpencil_vertex_tool not in {'BLUR', 'AVERAGE', 'SMEAR'}:
             row.separator(factor=0.4)
-            row.prop(brush, "color", text="")
-
-            row.popover(
-                panel="TOPBAR_PT_gpencil_vertexcolor",
-                text="",
-            )
+            row.prop_with_popover(brush, "color", text="", panel="TOPBAR_PT_gpencil_vertexcolor")
 
         from bl_ui.properties_paint_common import (
             brush_basic_gpencil_vertex_settings,



More information about the Bf-blender-cvs mailing list