diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-02 18:43:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-02 18:43:22 +0400 |
commit | 0d12c77097b19bfa688c99480f755184ad46342b (patch) | |
tree | a37bd154a82915c9b616fcbd855c6e4aeff16939 /release/scripts | |
parent | 4e9162cd63badf4bf5fb312e108ffbbc58ebd342 (diff) |
bugfix [#23635] property limits don't work when added via scripting\
also fix for bug where soft limits could be greater then hard limits with bpy.props.* functions.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/rna_prop_ui.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index 4ee0b40faa8..4a9460d8271 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -84,6 +84,8 @@ def draw(layout, context, context_member, use_edit=True): props.data_path = context_member del row + rna_properties = {prop.identifier for prop in rna_item.bl_rna.properties if prop.is_runtime} if items else None + for key, val in items: if key == '_RNA_UI': @@ -113,7 +115,10 @@ def draw(layout, context, context_member, use_edit=True): if convert_to_pyobject and not hasattr(val_orig, "len"): row.label(text=val_draw) else: - row.prop(rna_item, '["%s"]' % key, text="") + if key in rna_properties: + row.prop(rna_item, key, text="") + else: + row.prop(rna_item, '["%s"]' % key, text="") if use_edit: row = split.row(align=True) |