[Bf-blender-cvs] [d5db3107374] greasepencil-object: Change Special menu to call picker

Antonio Vazquez noreply at git.blender.org
Mon Jan 22 09:29:20 CET 2018


Commit: d5db310737428839395cc1283472bf2a09544684
Author: Antonio Vazquez
Date:   Mon Jan 22 09:17:39 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBd5db310737428839395cc1283472bf2a09544684

Change Special menu to call picker

When the list of colors is too long, the menu is too long, so it's better call the picker menu.

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

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 ec6acd3a93d..9238cc84914 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -1075,14 +1075,7 @@ class GPENCIL_MT_gpencil_draw_specials(Menu):
 
         # colors
         layout.separator()
-        palette = context.active_gpencil_palette
-        brush = context.active_gpencil_brush
-        for i, palcolor in enumerate(palette.colors):
-            if brush is None or brush.fill_only is False or brush.fill_allow_stroke_only is True:
-                layout.operator("palette.palettecolor_choose", text=palcolor.name).index=i
-            else:
-                if palcolor.fill_alpha > 0.0:
-                    layout.operator("palette.palettecolor_choose", text=palcolor.name).index = i
+        layout.operator("gpencil.colorpick", text="Colors", icon="GROUP_VCOL")
 
 
 class GPENCIL_MT_gpencil_vertex_group(Menu):



More information about the Bf-blender-cvs mailing list