merge from trunk at r31523

This commit is contained in:
2010-09-07 05:47:34 +00:00
342 changed files with 6150 additions and 4824 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)
@@ -130,11 +135,11 @@ class PropertyPanel():
and the variable '_context_path' MUST be set.
"""
bl_label = "Custom Properties"
bl_default_closed = True
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
bool(eval("context.%s" % cls._context_path))
return bool(eval("context.%s" % cls._context_path))
def draw(self, context):
draw(self.layout, context, self._context_path)