[Bf-blender-cvs] [59653a450ec] master: Cleanup: rename group to collection for internal instancing flag

Campbell Barton noreply at git.blender.org
Tue Sep 8 08:51:26 CEST 2020


Commit: 59653a450ec02ed4f94aa3f059da069525490a21
Author: Campbell Barton
Date:   Tue Sep 8 16:49:17 2020 +1000
Branches: master
https://developer.blender.org/rB59653a450ec02ed4f94aa3f059da069525490a21

Cleanup: rename group to collection for internal instancing flag

Also update old comment.

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

M	source/blender/blenloader/intern/readfile.c
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/windowmanager/intern/wm_files_link.c

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c809a87b188..195bb1e7f9f 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10313,9 +10313,9 @@ static void add_loose_objects_to_scene(Main *mainvar,
         }
 
         if (flag & FILE_AUTOSELECT) {
-          base->flag |= BASE_SELECTED;
           /* Do NOT make base active here! screws up GUI stuff,
-           * if you want it do it on src/ level. */
+           * if you want it do it at the editor level. */
+          base->flag |= BASE_SELECTED;
         }
 
         BKE_scene_object_base_flag_sync_from_base(base);
@@ -10371,6 +10371,8 @@ static void add_loose_object_data_to_scene(Main *mainvar,
         }
 
         if (flag & FILE_AUTOSELECT) {
+          /* Do NOT make base active here! screws up GUI stuff,
+           * if you want it do it at the editor level. */
           base->flag |= BASE_SELECTED;
         }
 
@@ -10398,7 +10400,7 @@ static void add_collections_to_scene(Main *mainvar,
 
   /* Give all objects which are tagged a base. */
   LISTBASE_FOREACH (Collection *, collection, &mainvar->collections) {
-    if ((flag & FILE_GROUP_INSTANCE) && (collection->id.tag & LIB_TAG_DOIT)) {
+    if ((flag & FILE_COLLECTION_INSTANCE) && (collection->id.tag & LIB_TAG_DOIT)) {
       /* Any indirect collection should not have been tagged. */
       BLI_assert((collection->id.tag & LIB_TAG_INDIRECT) == 0);
 
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 92cf9d21e07..6fe6a5461e1 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -816,7 +816,7 @@ typedef enum eFileSel_Params_Flag {
   FILE_DIRSEL_ONLY = (1 << 7),
   FILE_FILTER = (1 << 8),
   FILE_OBDATA_INSTANCE = (1 << 9),
-  FILE_GROUP_INSTANCE = (1 << 10),
+  FILE_COLLECTION_INSTANCE = (1 << 10),
   FILE_SORT_INVERT = (1 << 11),
   FILE_HIDE_TOOL_PROPS = (1 << 12),
   FILE_CHECK_EXISTING = (1 << 13),
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 559eb6a78c2..6ed9dcd4cdc 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -135,7 +135,7 @@ static short wm_link_append_flag(wmOperator *op)
     flag |= FILE_LINK;
   }
   if (RNA_boolean_get(op->ptr, "instance_collections")) {
-    flag |= FILE_GROUP_INSTANCE;
+    flag |= FILE_COLLECTION_INSTANCE;
   }
   if (RNA_boolean_get(op->ptr, "instance_object_data")) {
     flag |= FILE_OBDATA_INSTANCE;
@@ -397,9 +397,9 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
   if (scene && scene->id.lib) {
     BKE_reportf(op->reports,
                 RPT_WARNING,
-                "Scene '%s' is linked, instantiation of objects & groups is disabled",
+                "Scene '%s' is linked, instantiation of objects is disabled",
                 scene->id.name + 2);
-    flag &= ~(FILE_GROUP_INSTANCE | FILE_OBDATA_INSTANCE);
+    flag &= ~(FILE_COLLECTION_INSTANCE | FILE_OBDATA_INSTANCE);
     scene = NULL;
   }



More information about the Bf-blender-cvs mailing list