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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 5a93e18a7dd..047e5ea17ab 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -6966,3 +6966,22 @@ bool RNA_struct_equals(PointerRNA *a, PointerRNA *b, eRNAEqualsMode mode)
return equals;
}
+
+bool RNA_path_resolved_create(
+ PointerRNA *ptr, struct PropertyRNA *prop,
+ const int prop_index,
+ PathResolvedRNA *r_anim_rna)
+{
+ int array_len = RNA_property_array_length(ptr, prop);
+
+ if ((array_len == 0) || (prop_index < array_len)) {
+ r_anim_rna->ptr = *ptr;
+ r_anim_rna->prop = prop;
+ r_anim_rna->prop_index = array_len ? prop_index : -1;
+
+ return true;
+ }
+ else {
+ return false;
+ }
+}