diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-25 12:07:04 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-09-25 12:07:04 +0300 |
commit | c67873e49b784e799360d07a2a0b78e03eac00b3 (patch) | |
tree | c9133be57e52ec3dc48c7cd05e1caf047109e320 /source/blender/makesrna/intern/rna_collection.c | |
parent | db76de147e9ab74ba1355198c1c28bc924a990ce (diff) |
LibOverride: Silence some more asserts.
Print out messages into console instead when se cannot find expected
data (this is actually normal when source library gets edited).
Note that there seems to be some issue with the 'auto-cleanup' mechanism
removing no more valid override rules on file save, will check on that
next.
Related to T81059, found while investigating it.
Diffstat (limited to 'source/blender/makesrna/intern/rna_collection.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_collection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c index b0250897d6d..69f8bd85975 100644 --- a/source/blender/makesrna/intern/rna_collection.c +++ b/source/blender/makesrna/intern/rna_collection.c @@ -167,13 +167,17 @@ static bool rna_Collection_objects_override_apply(Main *bmain, Collection *coll_dst = (Collection *)ptr_dst->owner_id; if (ptr_item_dst->type == NULL || ptr_item_src->type == NULL) { - BLI_assert(0 && "invalid source or destination object."); + // BLI_assert(0 && "invalid source or destination object."); return false; } Object *ob_dst = ptr_item_dst->data; Object *ob_src = ptr_item_src->data; + if (ob_src == ob_dst) { + return true; + } + CollectionObject *cob_dst = BLI_findptr( &coll_dst->gobject, ob_dst, offsetof(CollectionObject, ob)); |