From 3e4d720ae4836783db978b0a378e97b47dcaca87 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 31 Aug 2021 11:46:47 +1000 Subject: Fix logical error resolving RNA paths Only append RNA_path_from_ID_to_struct to context attributes if those paths resolve to ID types. Also simplify creating RNA paths by adding utility functions: - WM_context_path_resolve_property_full - WM_context_path_resolve_full Part of fix for T90723. --- source/blender/makesrna/RNA_access.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/RNA_access.h') diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index abbe609d0ef..76155973982 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -1162,7 +1162,7 @@ char *RNA_path_from_struct_to_idproperty(PointerRNA *ptr, struct IDProperty *nee struct ID *RNA_find_real_ID_and_path(struct Main *bmain, struct ID *id, const char **r_path); -char *RNA_path_from_ID_to_struct(PointerRNA *ptr); +char *RNA_path_from_ID_to_struct(const PointerRNA *ptr); char *RNA_path_from_real_ID_to_struct(struct Main *bmain, PointerRNA *ptr, struct ID **r_real); @@ -1192,7 +1192,7 @@ char *RNA_path_full_property_py(struct Main *bmain, struct PropertyRNA *prop, int index); char *RNA_path_struct_property_py(struct PointerRNA *ptr, struct PropertyRNA *prop, int index); -char *RNA_path_property_py(struct PointerRNA *ptr, struct PropertyRNA *prop, int index); +char *RNA_path_property_py(const struct PointerRNA *ptr, struct PropertyRNA *prop, int index); /* Quick name based property access * -- cgit v1.2.3