Page MenuHome

Fix T73972: Collection in outliner grayed out when all child collections are disabled
ClosedPublic

Authored by Manuel Castilla (manzanilla) on May 28 2020, 7:33 PM.

Details

Summary

I think as a user the expected behavior is that whether children collections or objects are visible or not (grayed out) shouldn't affect parent collection visible state. Only his own "disable in viewports" and "hide in viewport" options and his parent's should be taken into account. And the same for other states.
For example when you create an empty collection is visible (non grayed out) even when it doesn't have any visible child.

In the patch I removed the part that takes into account children flags which provoked LAYER_COLLECTION_VISIBLE_VIEW_LAYER flag not being set in lc->runtime_flag when all children collections where not visible (layer_collection_sync eval only children collections flags, children objects flags are eval later out of this function).
lc->runtime_flag is used later by the outliner code to check if the tree element should be visible or not and then draw it as grayed out or not.

Diff Detail

Repository
rB Blender

Event Timeline

Manuel Castilla (manzanilla) requested review of this revision.May 28 2020, 7:33 PM
Dalai Felinto (dfelinto) requested changes to this revision.May 29 2020, 10:30 AM

@Brecht Van Lommel (brecht) the patch is fine and working for me. Do you want to check out, otherwise I can commit after the author can do a final cleanup pass.

@Manuel Castilla (manzanilla) layer_collection_sync return argument is not used anywhere. You can make it void again.

This revision now requires changes to proceed.May 29 2020, 10:30 AM
This revision was not accepted when it landed; it landed in state Needs Review.May 29 2020, 11:56 AM
This revision was automatically updated to reflect the committed changes.

@Manuel Castilla (manzanilla) thanks for the fix. I committed it to master, which means will be in 2.90 but not in 2.83 (this is not critical enough to be worth risking that close to the release - during bcon4).