diff options
Diffstat (limited to 'release/scripts/modules/rna_prop_ui.py')
-rw-r--r-- | release/scripts/modules/rna_prop_ui.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index 9311987e2e7..b0fb3b66d0a 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -111,12 +111,16 @@ def draw(layout, context, context_member, property_type, use_edit=True): continue row = layout.row() - convert_to_pyobject = getattr(val, "convert_to_pyobject", None) + to_dict = getattr(val, "to_dict", None) + to_list = getattr(val, "to_list", None) val_orig = val - if convert_to_pyobject: - val_draw = val = val.convert_to_pyobject() - val_draw = str(val_draw) + if to_dict: + val = to_dict() + val_draw = str(val) + elif to_list: + val = to_list() + val_draw = str(val) else: val_draw = val @@ -131,7 +135,7 @@ def draw(layout, context, context_member, property_type, use_edit=True): row.label(text=key) # explicit exception for arrays - if convert_to_pyobject and not hasattr(val_orig, "len"): + if to_dict or to_list: row.label(text=val_draw) else: if key in rna_properties: |