[Bf-blender-cvs] [157a8727b59] master: Fix brush menu broken before adding uv and texture data
Aaron Carlisle
noreply at git.blender.org
Tue Apr 18 05:56:52 CEST 2017
Commit: 157a8727b59b3f5d8932b22fe13db8d5442f1516
Author: Aaron Carlisle
Date: Mon Apr 17 23:42:17 2017 -0400
Branches: master
https://developer.blender.org/rB157a8727b59b3f5d8932b22fe13db8d5442f1516
Fix brush menu broken before adding uv and texture data
To reproduce: 1) go to texture paint mode 2) go into the brush menu
Pointed out by @lijenstina on IRC also fix is authored by him.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index f13c7095f67..9245def7473 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1699,7 +1699,7 @@ class VIEW3D_MT_brush(Menu):
layout = self.layout
settings = UnifiedPaintPanel.paint_settings(context)
- brush = settings.brush
+ brush = getattr(settings, "brush", None)
ups = context.tool_settings.unified_paint_settings
layout.prop(ups, "use_unified_size", text="Unified Size")
@@ -1708,6 +1708,11 @@ class VIEW3D_MT_brush(Menu):
layout.prop(ups, "use_unified_color", text="Unified Color")
layout.separator()
+ # skip if no active brush
+ if not brush:
+ layout.label(text="No Brushes currently available", icon="INFO")
+ return
+
# brush paint modes
layout.menu("VIEW3D_MT_brush_paint_modes")
@@ -1720,10 +1725,6 @@ class VIEW3D_MT_brush(Menu):
elif context.vertex_paint_object or context.weight_paint_object:
layout.prop_menu_enum(brush, "vertex_tool")
- # skip if no active brush
- if not brush:
- return
-
# TODO: still missing a lot of brush options here
# sculpt options
More information about the Bf-blender-cvs
mailing list