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
Notes: blender-bot 2023-02-14 03:03:03 +01:00
Referenced by issue #63678, We failed to build Blender on x86 due to error LNK2005: _log2 already defined in libucrt.lib with MSVC.
2 changed files with 8 additions and 2 deletions

View File

@ -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)

View File

@ -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'}