Fix (unreported) broken usercount of collections after duplication.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 6 Mar 2019 13:49:27 +0000 (14:49 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 6 Mar 2019 14:19:29 +0000 (15:19 +0100)
Was missing proper flag in library_query code, collections are also
id-users of their children collections.

source/blender/blenkernel/intern/library_query.c

index d4ded5458c1b3a72abc2446395928eb14c092231..267699b67c1502ab47d42a8c3aa4b9e3ced514d8 100644 (file)
@@ -780,7 +780,7 @@ static void library_foreach_ID_link(
                                        CALLBACK_INVOKE(cob->ob, IDWALK_CB_USER);
                                }
                                for (CollectionChild *child = collection->children.first; child; child = child->next) {
-                                       CALLBACK_INVOKE(child->collection, IDWALK_CB_NEVER_SELF);
+                                       CALLBACK_INVOKE(child->collection, IDWALK_CB_NEVER_SELF | IDWALK_CB_USER);
                                }
                                for (CollectionParent *parent = collection->parents.first; parent; parent = parent->next) {
                                        CALLBACK_INVOKE(parent->collection, IDWALK_CB_NEVER_SELF);