diff options
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 819ec4fc2d3..0afd67e5e66 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -629,8 +629,9 @@ static int override_remove_button_exec(bContext *C, wmOperator *op) /* We need source (i.e. linked data) to restore values of deleted overrides... * If this is an override template, we obviously do not need to restore anything. */ if (!is_template) { + PropertyRNA *src_prop; RNA_id_pointer_create(id->override_library->reference, &id_refptr); - if (!RNA_path_resolve(&id_refptr, oprop->rna_path, &src, NULL)) { + if (!RNA_path_resolve_property(&id_refptr, oprop->rna_path, &src, &src_prop)) { BLI_assert(0 && "Failed to create matching source (linked data) RNA pointer"); } } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index d44020a52a1..8327456f460 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -5360,6 +5360,10 @@ static bool rna_path_parse(PointerRNA *ptr, * Resolve the given RNA Path to find the pointer and/or property * indicated by fully resolving the path. * + * \warning Unlike \a RNA_path_resolve_property(), that one *will* try to follow RNAPointers, + * e.g. the path 'parent' applied to a RNAObject \a ptr will return the object.parent in \a r_ptr, + * and a NULL \a r_prop... + * * \note Assumes all pointers provided are valid * \return True if path can be resolved to a valid "pointer + property" OR "pointer only" */ |