- new pyrna api functions srna & prop path_to_id(), useful when setting driver target paths.

This means you can have a pose bone for eg and get the path...
   pose.bones["Bone"]
 uses rna internal functions, so will work for sequence strips etc.

- StructRNA.get(), used for getting ID props without exceptions...
 val = C.object["someKey"]
 or..
 val = C.object.get("someKey", "defaultValue") # wont raise an error

- change rna property for testing if rna props are editable, test the flag rather then calling the function since the function depends on blenders state.

- fix a python exception with the ID-Property popup UI (when editing in more then 1 step)
This commit is contained in:
Campbell Barton
2009-11-23 23:17:23 +00:00
parent b7d717cead
commit e968017951
4 changed files with 95 additions and 3 deletions

View File

@@ -177,6 +177,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
exec_str = "item['%s'] = %s" % (prop, value_eval)
# print(exec_str)
exec(exec_str)
self._last_prop[:] = [prop]
prop_type = type(item[prop])