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:
authorCampbell Barton <ideasman42@gmail.com>2018-11-03 11:39:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-03 11:47:20 +0300
commit97336343c48331e794e96977e84ba2031e75b518 (patch)
tree36cdb472a4c4acbfce44c5e501bbf9ae76692819 /release
parent628908a710a2f7a4b4900bc93b0b3c445a4ed0ad (diff)
UI: show brush selector in topbar
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py29
1 files changed, 24 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 05221151b40..e3b2b16c3c2 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -227,7 +227,11 @@ class _draw_left_context_mode:
def SCULPT(context, layout, tool):
if (tool is None) or (not tool.has_datablock):
return
- brush = context.tool_settings.sculpt.brush
+
+ paint = context.tool_settings.sculpt
+ layout.template_ID_preview(paint, "brush", rows=3, cols=8, hide_buttons=True)
+
+ brush = paint.brush
if brush is None:
return
@@ -240,7 +244,11 @@ class _draw_left_context_mode:
def PAINT_TEXTURE(context, layout, tool):
if (tool is None) or (not tool.has_datablock):
return
- brush = context.tool_settings.image_paint.brush
+
+ paint = context.tool_settings.image_paint
+ layout.template_ID_preview(paint, "brush", rows=3, cols=8, hide_buttons=True)
+
+ brush = paint.brush
if brush is None:
return
@@ -253,7 +261,11 @@ class _draw_left_context_mode:
def PAINT_VERTEX(context, layout, tool):
if (tool is None) or (not tool.has_datablock):
return
- brush = context.tool_settings.vertex_paint.brush
+
+ paint = context.tool_settings.vertex_paint
+ layout.template_ID_preview(paint, "brush", rows=3, cols=8, hide_buttons=True)
+
+ brush = paint.brush
if brush is None:
return
@@ -266,7 +278,10 @@ class _draw_left_context_mode:
def PAINT_WEIGHT(context, layout, tool):
if (tool is None) or (not tool.has_datablock):
return
- brush = context.tool_settings.weight_paint.brush
+
+ paint = context.tool_settings.weight_paint
+ layout.template_ID_preview(paint, "brush", rows=3, cols=8, hide_buttons=True)
+ brush = paint.brush
if brush is None:
return
@@ -328,7 +343,11 @@ class _draw_left_context_mode:
def PAINT(context, layout, tool):
if (tool is None) or (not tool.has_datablock):
return
- brush = context.tool_settings.image_paint.brush
+
+ paint = context.tool_settings.image_paint
+ layout.template_ID_preview(paint, "brush", rows=3, cols=8, hide_buttons=True)
+
+ brush = paint.brush
if brush is None:
return