diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-31 04:46:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-31 05:06:47 +0300 |
commit | 3e4d720ae4836783db978b0a378e97b47dcaca87 (patch) | |
tree | cb53100de53f0aa4de38f9e69eb5221b9e8c98fd /source/blender/makesrna/RNA_access.h | |
parent | aabe6e3b457f1d4f1b860ed510bf2630a818465e (diff) |
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.
Diffstat (limited to 'source/blender/makesrna/RNA_access.h')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 * |