Page MenuHome

Collections created with CTRL G do not appear in Outliner View Layer
Closed, DuplicatePublicKNOWN ISSUE

Description

System Information
Operating system: Darwin-19.2.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon R9 M295X OpenGL Engine ATI Technologies Inc. 4.1 ATI-3.4.19

Blender Version
Broken: version: 2.83 (sub 0), branch: master, commit date: 2020-01-16 20:11, hash: rB86db35845a83
Worked: (optional)

Short description of error
Collections created with CTRL G do not appear in Outliner View Layer

Exact steps for others to reproduce the error

  1. Select more than one object
  2. CTRL G to 'Make New Collection'
  3. Observe that this collection is not shown in View Layer of Outliner
  4. Switch Outliner to Blender File
  5. Observe that the new collection IS shown in the Blender File list

Looks like a bug to me?
Thanks
Wayne

Event Timeline

Sybren A. Stüvel (sybren) changed the task status from Needs Triage to Confirmed.EditedJan 17 2020, 4:43 PM
Sybren A. Stüvel (sybren) changed the subtype of this task from "Report" to "Known Issue".

AFAIK this is by design. The newly created collection doesn't have to be in the scene to be used; for example, it can be used in a particle system.

Something like this could be sufficient to implement this:

diff --git a/source/blender/editors/object/object_collection.c b/source/blender/editors/object/object_collection.c
index a00e5e7b198..12c6a488532 100644
--- a/source/blender/editors/object/object_collection.c
+++ b/source/blender/editors/object/object_collection.c
@@ -401,6 +401,28 @@ static int collection_create_exec(bContext *C, wmOperator *op)
   }
   CTX_DATA_END;
 
+  /* Add the new collection to the scene. */
+  Collection *active_collection = CTX_data_collection(C);
+  Scene *scene = CTX_data_scene(C);
+  bool scene_is_linked = ID_IS_LINKED(scene);
+  if ((active_collection->flag & COLLECTION_IS_MASTER) && scene_is_linked) {
+    BKE_report(op->reports, RPT_WARNING, "Cannot add a collection to a linked scene");
+    active_collection = NULL;
+  }
+  else if (ID_IS_LINKED(active_collection)) {
+    /* Fall back to the scene master collection if possible. */
+    if (scene_is_linked) {
+      BKE_report(op->reports, RPT_WARNING, "Cannot add a collection to a linked scene");
+      active_collection = NULL;
+    }
+    else {
+      active_collection = scene->master_collection;
+    }
+  }
+  if (active_collection != NULL) {
+    BKE_collection_child_add(bmain, active_collection, collection);
+  }
+
   DEG_relations_tag_update(bmain);
   WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);

However, a change like this should be properly designed & the behaviour agreed upon before implementing it.

I checked with @Dalai Felinto (dfelinto) and Ctrl+G is working as designed right now.

Fair enough, but does seem strange to me. If a dialog tells me that I am about to 'Create New Collection' as CTRL+G does, wouldn't I reasonably expect that created Collection to behave just the same as any other Collection, and appear in the View Layer, just as a Collection created in any other way does?

O agree on this, if it’s working as designed there are two possibilities:

1.- Bad design :) but I don’t think so, I see the utility of this

2.- Bad user feedback/UI/communication of what is happening, I think the dialog should communicate a bit better what is happening, and in any case a checkbox like “Instance to Scene” or “Add collection to scene” wouldn’t hurt :)