forked from bartvdbraak/blender
Cleanup: use keyword only args to rna_idprop_ui_create
This commit is contained in:
parent
40dd91561d
commit
d217b23f73
@ -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'}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user