diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-23 21:39:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-24 15:01:51 +0300 |
commit | c56bbf60d85f502e4fecef70060e0d450be2c239 (patch) | |
tree | 6ab0eb774498b637c23dbf9768392e41ba63d461 /source/blender/editors/space_outliner/outliner_collections.c | |
parent | d67b120f172290fc7a1b4cfb5432e03017426f6e (diff) |
Outliner: reorganize collection related display modes.
* "Scenes" now shows for each scene lists of all view layers, collections and
objects contained in it. This is the place to see all collections and objects
in the scene even if they are not used in any view layer. Objects are nested
according to parenting here.
* "Collections" now shows all collections in the view layer, and the objects
in those collections. Objects are not nested by parenting, only collections
since it would be too confusing if the children are in a different collection.
* "Groups" is unchanged.
* "View Layer" was removed, replaced by "Collections".
Part of T54790.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_collections.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_collections.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c index 7c3bccd1385..fd2b463f91b 100644 --- a/source/blender/editors/space_outliner/outliner_collections.c +++ b/source/blender/editors/space_outliner/outliner_collections.c @@ -86,17 +86,6 @@ static int collections_editor_poll(bContext *C) return (so != NULL) && (so->outlinevis == SO_COLLECTIONS); } -static int view_layer_editor_poll(bContext *C) -{ - SpaceOops *so = CTX_wm_space_outliner(C); - return (so != NULL) && (so->outlinevis == SO_VIEW_LAYER); -} - -static int outliner_either_collection_editor_poll(bContext *C) -{ - SpaceOops *so = CTX_wm_space_outliner(C); - return (so != NULL) && (ELEM(so->outlinevis, SO_VIEW_LAYER, SO_COLLECTIONS)); -} static int outliner_objects_collection_poll(bContext *C) { @@ -113,7 +102,7 @@ static int outliner_objects_collection_poll(bContext *C) return 0; } - return ELEM(so->outlinevis, SO_VIEW_LAYER, SO_COLLECTIONS, SO_GROUPS); + return ELEM(so->outlinevis, SO_COLLECTIONS, SO_GROUPS); } /* -------------------------------------------------------------------- */ @@ -279,7 +268,7 @@ void OUTLINER_OT_collection_link(wmOperatorType *ot) */ static int collection_unlink_poll(bContext *C) { - if (view_layer_editor_poll(C) == 0) { + if (collections_editor_poll(C) == 0) { return 0; } @@ -973,7 +962,7 @@ void OUTLINER_OT_collection_objects_select(wmOperatorType *ot) /* api callbacks */ ot->exec = collection_objects_select_exec; - ot->poll = view_layer_editor_poll; + ot->poll = collections_editor_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -1023,10 +1012,10 @@ static int collection_duplicate_exec(bContext *C, wmOperator *op) } switch (soops->outlinevis) { - case SO_COLLECTIONS: + case SO_SCENES: BKE_collection_duplicate(TREESTORE(te)->id, (SceneCollection *)te->directdata); break; - case SO_VIEW_LAYER: + case SO_COLLECTIONS: case SO_GROUPS: BKE_layer_collection_duplicate(TREESTORE(te)->id, (LayerCollection *)te->directdata); break; @@ -1047,7 +1036,7 @@ void OUTLINER_OT_collection_duplicate(wmOperatorType *ot) /* api callbacks */ ot->exec = collection_duplicate_exec; - ot->poll = outliner_either_collection_editor_poll; + ot->poll = collections_editor_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; |