Hide collections menu: ignore excluded collections

Note: I didn't change the shortcuts, I think this is a separate decision
to be made. I just want at the moment to have the H operator to mimic
the upcoming popover.

Personally if we are to keep the 1-10 shortcuts (and they do work) I
think we should skip the excluded collections altogether.

In fact we could have an option to hide them from the outliner too.
This commit is contained in:
Dalai Felinto 2018-11-15 10:00:21 -02:00
parent bdca863956
commit 570e37261d
1 changed files with 4 additions and 0 deletions

View File

@ -311,6 +311,10 @@ void ED_hide_collections_menu_draw(const bContext *C, uiLayout *layout)
int index = BKE_layer_collection_findindex(view_layer, lc);
uiLayout *row = uiLayoutRow(layout, false);
if (lc->flag & LAYER_COLLECTION_EXCLUDE) {
continue;
}
if (lc->collection->flag & COLLECTION_RESTRICT_VIEW) {
continue;
}