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.
This commit is contained in:
Campbell Barton
2010-09-02 14:43:22 +00:00
parent 4e9162cd63
commit 0d12c77097
3 changed files with 24 additions and 5 deletions

View File

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