UI: Avoid redundant text argument to UnifiedPaintPanel methods

Now when the text argument is omitted, use the default name
matching how regular properties work.

Avoids passing in the same name which RNA has,
matches UILayout.prop behavior.

Also use keyword only for optional arguments.
This commit is contained in:
Campbell Barton
2019-03-12 16:19:37 +11:00
parent 5234ced102
commit d8daeeb930
5 changed files with 41 additions and 43 deletions

View File

@@ -981,10 +981,8 @@ class _defs_weight_paint:
brush = context.tool_settings.weight_paint.brush
if brush is not None:
from .properties_paint_common import UnifiedPaintPanel
UnifiedPaintPanel.prop_unified_weight(
layout, context, brush, "weight", slider=True, text="Weight")
UnifiedPaintPanel.prop_unified_strength(
layout, context, brush, "strength", slider=True, text="Strength")
UnifiedPaintPanel.prop_unified_weight(layout, context, brush, "weight", slider=True)
UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True)
props = tool.operator_properties("paint.weight_gradient")
layout.prop(props, "type")