[Bf-blender-cvs] [0f6be4e1520] master: Cleanup: Readfile: cleanup some logic checks.

Bastien Montagne noreply at git.blender.org
Thu Sep 9 11:07:15 CEST 2021


Commit: 0f6be4e1520087bfe6d1dc98b61d65686ae09b3f
Author: Bastien Montagne
Date:   Thu Sep 9 10:51:39 2021 +0200
Branches: master
https://developer.blender.org/rB0f6be4e1520087bfe6d1dc98b61d65686ae09b3f

Cleanup: Readfile: cleanup some logic checks.

===================================================================

M	source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3e9ea8db758..9704e8bb413 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4500,7 +4500,8 @@ static void add_loose_objects_to_scene(Main *mainvar,
    * or for a collection when *lib has been set. */
   LISTBASE_FOREACH (Object *, ob, &mainvar->objects) {
     bool do_it = (ob->id.tag & LIB_TAG_DOIT) != 0;
-    if (do_it || ((ob->id.tag & LIB_TAG_INDIRECT) && (ob->id.tag & LIB_TAG_PRE_EXISTING) == 0)) {
+    if (do_it ||
+        ((ob->id.tag & LIB_TAG_INDIRECT) != 0 && (ob->id.tag & LIB_TAG_PRE_EXISTING) == 0)) {
       if (do_append) {
         if (ob->id.us == 0) {
           do_it = true;
@@ -4648,7 +4649,7 @@ static void add_collections_to_scene(Main *mainvar,
         LISTBASE_FOREACH (CollectionObject *, coll_ob, &collection->gobject) {
           Object *ob = coll_ob->ob;
           if ((ob->id.tag & (LIB_TAG_PRE_EXISTING | LIB_TAG_DOIT | LIB_TAG_INDIRECT)) == 0 &&
-              (ob->id.lib == lib) && (object_in_any_scene(bmain, ob) == 0)) {
+              (ob->id.lib == lib) && (object_in_any_scene(bmain, ob) == false)) {
             do_add_collection = true;
             break;
           }



More information about the Bf-blender-cvs mailing list