Page MenuHome

Workspaces: Changing active view layer doesn't update viewport visibility
Closed, InvalidPublic


Blender Version
Broken: fe1e2c2f89

Short description of error
Disabled collections are "visible" when switch back and forth workspace viewlayers.

Exact steps for others to reproduce the error

  • Default Blender, disable Collection 1
  • Switch to "Viewport" view layer
  • Switch back to "RenderLayer" view layer

If we force depsgraph visibility to be re-evaluated (e.g., by changing the selectability of a collection) we get the "Viewport" to properly hide its objects.

I don't know if this is a depsgraph or workspaces bug to be honest.



Event Timeline

Dalai Felinto (dfelinto) triaged this task as Confirmed priority.

We could simply ask depsgraph to re-evaluate the collections' visibility when changing workspace (DEG_id_tag_update(&scene->id, 0);). But I thought we already had a different depsgraph per viewlayer, so this shouldn't be necessary.

You definitely shouldn't be tagging SCENE for update when changing visible view layer. Also, now you should stop using flag 0 for updates, What you meant here perhaps is DEG_TAG_BASE_FLAGS_UPDATE.

Now, while we've got dependency graph per-view layer, the storage is still shared, unless you use copy on write. I've fixed missing updates for changing collections enabled flag in rB9c493ca, so now this case works fine there.

Fixing this issue to work without CoW is a waste of time.

Thanks for the explanation. It only occurred to me later that CoW was the missing piece here. I agree that it should be closed as invalid.