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>2015-02-17 05:09:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-17 05:13:59 +0300
commit4bb331dfd5f3d9a42140e8f12bb917c525eeb529 (patch)
tree90107388131cad0c65ef19887406dacb93c11a83 /source/blender/makesrna
parent691cb61835dcf8964cb1e6110a4d369665fa1f21 (diff)
RNA API: reuse property lookups
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_access.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 7096060e73b..7a2bd83a1c8 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -4740,8 +4740,9 @@ char *RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index)
/* this may not be an ID at all, check for simple when pointer owns property.
* TODO, more complex nested case */
if (!RNA_struct_is_ID(ptr->type)) {
- if (RNA_struct_find_property(ptr, RNA_property_identifier(prop)) == prop) {
- data_path = BLI_strdup(RNA_property_identifier(prop));
+ const char *prop_identifier = RNA_property_identifier(prop);
+ if (RNA_struct_find_property(ptr, prop_identifier) == prop) {
+ data_path = BLI_strdup(prop_identifier);
}
}
}