[Bf-blender-cvs] [f0770b8578f] master: Fix: Make sure color panels only appear in modes where they are supported
William Reynish
noreply at git.blender.org
Tue Mar 19 19:42:18 CET 2019
Commit: f0770b8578f375fdfb733c6fdb8af9a0902a5019
Author: William Reynish
Date: Tue Mar 19 19:42:17 2019 +0100
Branches: master
https://developer.blender.org/rBf0770b8578f375fdfb733c6fdb8af9a0902a5019
Fix: Make sure color panels only appear in modes where they are supported
===================================================================
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 a183dd19109..98336519d0d 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -405,11 +405,11 @@ class VIEW3D_PT_tools_brush_color(Panel, View3DPaintPanel):
brush = settings.brush
if context.image_paint_object:
capabilities = brush.image_paint_capabilities
+ return capabilities.has_color
elif context.vertex_paint_object:
capabilities = brush.vertex_paint_capabilities
-
- return capabilities.has_color
+ return capabilities.has_color
def draw(self, context):
layout = self.layout
@@ -433,11 +433,11 @@ class VIEW3D_PT_tools_brush_swatches(Panel, View3DPaintPanel):
brush = settings.brush
if context.image_paint_object:
capabilities = brush.image_paint_capabilities
+ return capabilities.has_color
elif context.vertex_paint_object:
capabilities = brush.vertex_paint_capabilities
-
- return capabilities.has_color
+ return capabilities.has_color
def draw(self, context):
layout = self.layout
More information about the Bf-blender-cvs
mailing list