diff options
author | Bastien Montagne <bastien@blender.org> | 2021-12-16 12:43:50 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-12-16 18:48:00 +0300 |
commit | b1f865f9d39a5010cc46b32c2ba64941fc6b5c2d (patch) | |
tree | 6b6e34d098c90d947d3253652f63c9ecedd6cd5b /source/blender/makesrna/intern/rna_access_compare_override.c | |
parent | 0f589f8d3ccc883704a692d8d22fb3860f12d695 (diff) |
LibOverride: Cleanup log about unfound subitems.
Not finding subitem when its name and index are invalid/unset is
expected behavior, and does happen when e.g. inserting a new constraint
or modifier at the begining of the stack.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access_compare_override.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access_compare_override.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c index 8cc6a095c1d..35af92592e9 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.c +++ b/source/blender/makesrna/intern/rna_access_compare_override.c @@ -1059,7 +1059,12 @@ static void rna_porperty_override_collection_subitem_lookup( *r_ptr_item_storage = private_ptr_item_storage; } - if ((*r_ptr_item_dst)->type == NULL) { + /* Note that there is no reason to report in case no item is expected, i.e. in case subitem name + * and index are invalid. This can often happen when inserting new items (constraint, + * modifier...) in a collection that supports it. */ + if ((*r_ptr_item_dst)->type == NULL && + ((opop->subitem_reference_name != NULL && opop->subitem_reference_name[0] != '\0') || + opop->subitem_reference_index != -1)) { CLOG_INFO(&LOG, 2, "Failed to find destination sub-item '%s' (%d) of '%s' in new override data '%s'", @@ -1068,7 +1073,9 @@ static void rna_porperty_override_collection_subitem_lookup( op->rna_path, ptr_dst->owner_id->name); } - if ((*r_ptr_item_src)->type == NULL) { + if ((*r_ptr_item_src)->type == NULL && + ((opop->subitem_local_name != NULL && opop->subitem_local_name[0] != '\0') || + opop->subitem_local_index != -1)) { CLOG_INFO(&LOG, 2, "Failed to find source sub-item '%s' (%d) of '%s' in old override data '%s'", |