[Bf-blender-cvs] [cc93479e3bd] greasepencil-object: UI: Hide appeareance panel for Eraser brush

Antonio Vazquez noreply at git.blender.org
Sat Mar 3 10:52:07 CET 2018


Commit: cc93479e3bdcd9f1750df7eb0112bf25d4dd3116
Author: Antonio Vazquez
Date:   Sat Mar 3 10:17:31 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBcc93479e3bdcd9f1750df7eb0112bf25d4dd3116

UI: Hide appeareance panel for Eraser brush

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

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 37c903065a4..2445e89980a 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -2484,7 +2484,10 @@ class VIEW3D_PT_tools_grease_pencil_appearance(Panel):
 
         workspace = context.workspace
         if context.active_object:
-            ob = context.active_object
+            brush = context.active_gpencil_brush
+            if brush and brush.type == 'ERASE':
+                return False
+
             return workspace.object_mode in {'GPENCIL_PAINT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}
             
         return False



More information about the Bf-blender-cvs mailing list