Fix T77161: Outliner - Hiding a Collection does not gray out children objects

Ensure that When checking "Hide in Viewport" option for a collection
that child objects are drawn grayed out for consistency with the
"Disable in Viewports" toggle.

For checking an object visibility in the viewport the flag
BASE_VISIBLE_VIEWLAYER should be used instead of BASE_VISIBLE_DEPSGRAPH
because the latter ignores viewport visibility.

Manifest Task: T77161

Differential Revision: https://developer.blender.org/D7904
This commit is contained in:
Manuel Castilla 2020-11-02 22:52:53 -07:00 committed by Nathan Craddock
parent c6d8300823
commit 20e982e78d
Notes: blender-bot 2023-02-14 08:29:54 +01:00
Referenced by issue #77161, Outliner: Hiding in viewport a Collection does not gray out its children objects
1 changed files with 1 additions and 1 deletions

View File

@ -1556,7 +1556,7 @@ static void outliner_add_layer_collection_objects(SpaceOutliner *space_outliner,
TreeElement *te_object = outliner_add_element(space_outliner, tree, base->object, ten, 0, 0);
te_object->directdata = base;
if (!(base->flag & BASE_VISIBLE_DEPSGRAPH)) {
if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) {
te_object->flag |= TE_DISABLED;
}
}