UI: show particle radius & strength in topbar

This commit is contained in:
Campbell Barton 2018-08-02 21:27:12 +10:00
parent 200212079d
commit 35a5fccf77
2 changed files with 23 additions and 7 deletions

View File

@ -224,6 +224,17 @@ class _draw_left_context_mode:
UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius")
UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")
def PARTICLE(context, layout):
settings = context.tool_settings.particle_edit
brush = settings.brush
tool = settings.tool
if tool != 'NONE':
layout.prop(brush, "size", slider=True)
if tool == 'ADD':
layout.prop(brush, "count")
else:
layout.prop(brush, "strength", slider=True)
class INFO_MT_editor_menus(Menu):
bl_idname = "INFO_MT_editor_menus"

View File

@ -289,16 +289,21 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
if context.particle_edit_object:
tool = settings.tool
layout.column().prop(settings, "tool", expand=True)
if tool != 'NONE':
col = layout.column()
col.prop(brush, "size", slider=True)
if tool != 'ADD':
col.prop(brush, "strength", slider=True)
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 == 'ADD':
col.prop(brush, "count")
col = layout.column()
col.prop(settings, "use_default_interpolate")
col.prop(brush, "steps", slider=True)