UI: show all particle brush settings in topbar

Also show particle brush in tool-properties panel.
This commit is contained in:
Campbell Barton 2018-08-02 22:10:38 +10:00
parent 35a5fccf77
commit f36855f0fd
3 changed files with 19 additions and 14 deletions

View File

@ -225,6 +225,7 @@ class _draw_left_context_mode:
UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")
def PARTICLE(context, layout):
# See: 'VIEW3D_PT_tools_brush', basically a duplicate
settings = context.tool_settings.particle_edit
brush = settings.brush
tool = settings.tool
@ -235,6 +236,15 @@ class _draw_left_context_mode:
else:
layout.prop(brush, "strength", slider=True)
if tool == 'ADD':
layout.prop(settings, "use_default_interpolate")
layout.prop(brush, "steps", slider=True)
layout.prop(settings, "default_key_count", slider=True)
elif tool == 'LENGTH':
layout.row().prop(brush, "length_mode", expand=True)
elif tool == 'PUFF':
layout.row().prop(brush, "puff_mode", expand=True)
layout.prop(brush, "use_puff_volume")
class INFO_MT_editor_menus(Menu):
bl_idname = "INFO_MT_editor_menus"

View File

@ -289,19 +289,14 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
if context.particle_edit_object:
tool = settings.tool
if self.is_popover:
# Topbar shows these already.
pass
else:
if tool != 'NONE':
layout.column().prop(settings, "tool", expand=True)
col = layout.column()
col.prop(brush, "size", slider=True)
if tool == 'ADD':
col.prop(brush, "count")
else:
col.prop(brush, "strength", slider=True)
if tool != 'NONE':
layout.column().prop(settings, "tool")
col = layout.column()
col.prop(brush, "size", slider=True)
if tool == 'ADD':
col.prop(brush, "count")
else:
col.prop(brush, "strength", slider=True)
if tool == 'ADD':
col = layout.column()

View File

@ -244,7 +244,7 @@ static void buttons_main_region_layout_tool(const bContext *C, ARegion *ar)
ARRAY_SET_ITEMS(contexts, ".paint_common", ".imagepaint");
break;
case CTX_MODE_PARTICLE:
ARRAY_SET_ITEMS(contexts, ".particlemode");
ARRAY_SET_ITEMS(contexts, ".paint_common", ".particlemode");
break;
case CTX_MODE_OBJECT:
ARRAY_SET_ITEMS(contexts, ".objectmode");