diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-25 10:01:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-25 10:01:46 +0400 |
commit | bb62f9a582d44e347f81b11610b8e18acc590b35 (patch) | |
tree | 8388562b686054e3ecbab5effce3ff56e87d6125 /release | |
parent | 24e1ce25d14cbb61499d9b1229f1f35e9d3408f5 (diff) |
Fix T38778: Properties from bpy.props could be edited as custom props
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/rna_prop_ui.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index e73b0358d00..5180bdb59ce 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -140,18 +140,23 @@ def draw(layout, context, context_member, property_type, use_edit=True): row.label(text=key, translate=False) # explicit exception for arrays + is_rna = (key in rna_properties) + if to_dict or to_list: row.label(text=val_draw, translate=False) else: - if key in rna_properties: + if is_rna: row.prop(rna_item, key, text="") else: row.prop(rna_item, '["%s"]' % escape_identifier(key), text="") if use_edit: row = split.row(align=True) - props = row.operator("wm.properties_edit", text="Edit") - assign_props(props, val_draw, key) + if not is_rna: + props = row.operator("wm.properties_edit", text="Edit") + assign_props(props, val_draw, key) + else: + row.label(text="API Defined") props = row.operator("wm.properties_remove", text="", icon='ZOOMOUT') assign_props(props, val_draw, key) |