diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-06-03 04:46:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-06-03 04:46:20 +0400 |
commit | 2a195b78257efdbe4901ec2bdc9fc457b6a28934 (patch) | |
tree | 59a3d3cebc8f1dcc87ed266b080f5e9285da3a80 /source/blender/makesrna/intern/rna_access.c | |
parent | 3ea4d7ff0136436f691bbe82b3ec4501bd7b3dcc (diff) |
fix [#35501] Operator log: some property changes log as [...].(null) = ...
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index af5de0f469e..9bd4f105f53 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4469,6 +4469,16 @@ char *RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index) data_path = RNA_path_from_ID_to_property(ptr, prop); + if (data_path == NULL) { + /* 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)); + } + } + } + if ((index == -1) || (RNA_property_array_check(prop) == FALSE)) { ret = BLI_sprintfN("%s", data_path); |