mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #155263: "Custom Property Values as Default" raises an exception
Updating defaults didn't account for some property types such as IDPropertyGroup not supporting id_properties_ui(...). Ref !155411
This commit is contained in:
parent
c1c7984396
commit
1e3c53d702
1 changed files with 7 additions and 1 deletions
|
|
@ -69,7 +69,13 @@ def rna_idprop_value_item_type(value):
|
|||
|
||||
|
||||
def rna_idprop_ui_prop_default_set(item, prop, value):
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
# NOTE: the internal check to know if a property supports UI is not exposed.
|
||||
# Use an exception here and assert this isn't catching unrelated errors.
|
||||
try:
|
||||
ui_data = item.id_properties_ui(prop)
|
||||
except TypeError as ex:
|
||||
assert ex.args and ("does not support UI data" in ex.args[0])
|
||||
return
|
||||
ui_data.update(default=value)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue