[Bf-blender-cvs] [f6a67e3460d] greasepencil-object: GPencil: Add Vertex Color to N Panel

Antonio Vazquez noreply at git.blender.org
Mon Nov 4 23:06:08 CET 2019


Commit: f6a67e3460dcb219195e28a97e503d706195c2aa
Author: Antonio Vazquez
Date:   Mon Nov 4 23:05:49 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBf6a67e3460dcb219195e28a97e503d706195c2aa

GPencil: Add Vertex Color to  N Panel

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

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

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

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index a249f4eff84..d0615165960 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -2041,24 +2041,22 @@ class VIEW3D_PT_tools_grease_pencil_brush_mixcolor(View3DPanel, Panel):
         ob = context.object
         ts = context.tool_settings
         settings = ts.gpencil_paint
+        brush = ts.gpencil_paint.brush
+        # if context.area.type != 'PROPERTIES':
+        #     return False
 
-        brush = context.tool_settings.gpencil_paint.brush
-        if context.area.type != 'PROPERTIES':
+        if ob is None or brush is None:
             return False
 
-        if ob is None or brush is None:
+        if context.region.type == 'TOOL_HEADER':
             return False
             
         if brush.gpencil_tool == 'TINT':
             return True
 
-
         if brush.gpencil_tool != 'DRAW':
             return False
 
-        # if brush.gpencil_tool == 'DRAW' and settings.use_vertex_color is False:
-        #     return False
-
         gp_settings = brush.gpencil_settings
         if gp_settings.use_material_pin is False:
             if ob.active_material_index >= 0:
@@ -2158,6 +2156,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_mix_palette(View3DPanel, Panel):
         layout.use_property_decorate = False
         ts = context.tool_settings
         settings = ts.gpencil_paint
+        brush = ts.gpencil_paint.brush
 
         col = layout.column()
         col.enabled = settings.use_vertex_color or brush.gpencil_tool == 'TINT'



More information about the Bf-blender-cvs mailing list