Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-24 02:17:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-24 02:17:23 +0300
commite968017951f8b38d4c33aac4225758687ba1e7d3 (patch)
treeb6f4bcd50b7cc24ce39fdedca0feb75c590ee41c /source/blender/makesrna/intern/rna_rna.c
parentb7d717cead9000c4600d71ed15fc10ebc103c591 (diff)
- 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)
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r--source/blender/makesrna/intern/rna_rna.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 4218724d7df..f8adb1a79d8 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -428,7 +428,12 @@ static int rna_Property_unit_get(PointerRNA *ptr)
static int rna_Property_editable_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
- return RNA_property_editable(ptr, prop);
+
+ /* dont use this becaure it will call functions that check the internal
+ * data for introspection we only need to know if it can be edited so the
+ * flag is better for this */
+// return RNA_property_editable(ptr, prop);
+ return prop->flag & PROP_EDITABLE ? 1:0;
}
static int rna_Property_use_return_get(PointerRNA *ptr)