[Bf-blender-cvs] [a99ea065071] greasepencil-object: GPencil: Hide Panels depending of Tool
Antonio Vazquez
noreply at git.blender.org
Mon Dec 16 15:40:09 CET 2019
Commit: a99ea065071ea7718e05d3866ce999a3aef9b675
Author: Antonio Vazquez
Date: Mon Dec 16 15:39:56 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBa99ea065071ea7718e05d3866ce999a3aef9b675
GPencil: Hide Panels depending of Tool
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index f71d847afa4..f198d25397d 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -120,9 +120,10 @@ class VIEW3D_HT_tool_header(Header):
if (tool is not None) and tool.has_datablock:
brush = context.tool_settings.gpencil_paint.brush
if brush.gpencil_tool != 'ERASE':
- layout.popover("VIEW3D_PT_tools_grease_pencil_brush_advanced")
+ if brush.gpencil_tool != 'TINT':
+ layout.popover("VIEW3D_PT_tools_grease_pencil_brush_advanced")
- if brush.gpencil_tool != 'FILL':
+ if brush.gpencil_tool not in {'FILL', 'TINT'}:
layout.popover("VIEW3D_PT_tools_grease_pencil_brush_stabilizer")
layout.popover("VIEW3D_PT_tools_grease_pencil_brush_random")
layout.popover("VIEW3D_PT_tools_grease_pencil_brushcurves")
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index dbcb1fcba5f..f6080785c57 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1457,7 +1457,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel):
@classmethod
def poll(cls, context):
brush = context.tool_settings.gpencil_paint.brush
- return brush is not None and brush.gpencil_tool != 'ERASE'
+ return brush is not None and brush.gpencil_tool not in {'ERASE', 'TINT'}
def draw(self, context):
layout = self.layout
@@ -1556,7 +1556,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_post_processing(View3DPanel, Panel):
@classmethod
def poll(cls, context):
brush = context.tool_settings.gpencil_paint.brush
- return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'}
+ return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'}
def draw_header(self, context):
if self.is_popover:
@@ -1606,7 +1606,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
@classmethod
def poll(cls, context):
brush = context.tool_settings.gpencil_paint.brush
- return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'}
+ return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'}
def draw_header(self, context):
if self.is_popover:
@@ -1652,7 +1652,7 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel):
@classmethod
def poll(cls, context):
brush = context.tool_settings.gpencil_paint.brush
- return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'}
+ return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL', 'TINT'}
def draw(self, context):
pass
More information about the Bf-blender-cvs
mailing list