Cleanup: use keyword only args to rna_idprop_ui_create

This commit is contained in:
Campbell Barton 2019-04-16 16:00:24 +02:00
parent 40dd91561d
commit d217b23f73
2 changed files with 8 additions and 2 deletions

@ -120,7 +120,13 @@ def rna_idprop_ui_prop_default_set(item, prop, value):
del rna_ui["default"]
def rna_idprop_ui_create(item, prop, default, min=0.0, max=1.0, soft_min=None, soft_max=None, description=None, overridable=False):
def rna_idprop_ui_create(
item, prop, *, default,
min=0.0, max=1.0,
soft_min=None, soft_max=None,
description=None,
overridable=False,
):
"""Create and initialize a custom property with limits, defaults and other settings."""
proptype = type(default)

@ -1343,7 +1343,7 @@ class WM_OT_properties_add(Operator):
*type(item).bl_rna.properties.keys(),
})
rna_idprop_ui_create(item, prop, 1.0)
rna_idprop_ui_create(item, prop, default=1.0)
return {'FINISHED'}