Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Carlisle <carlisle.b3d@gmail.com>2017-04-18 06:42:17 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2017-04-18 06:42:17 +0300
commit157a8727b59b3f5d8932b22fe13db8d5442f1516 (patch)
treed3a810eb8917a6770f07099c8e83fbead871a45c /release
parent4d0d1b5936c59b6e7ce5b3ae8b1af617cbdada61 (diff)
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.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py11
1 files changed, 6 insertions, 5 deletions
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