Group collection viewport/render options and remove collection visibility

Users can change the group collection visibility in the outliner
when looking at groups.

Regular collections on the other hand don't have any special visibility control,
if you need a collection to be invisible during render, either don't link it
into the view layer used for F12, or disable it.

This includes:
* Updated unittests - update your lib/tests/layers folder.
* Subversion bump - branches be aware of that.

Note:
Although we are using eval_ctx to determine the visibility of a group collection
when rendering, the depsgraph is still using the same depsgraph for the viewport
and the render engine, so at the moment the render visibility is ignored.

Following next is a workaround for this separately to tag the groups before and
after rendering to tackle that.
This commit is contained in:
Dalai Felinto
2017-12-14 11:46:49 -02:00
parent 7402b8ec74
commit 1f5106de61
38 changed files with 252 additions and 307 deletions

View File

@@ -37,9 +37,9 @@ class UnitTesting(ViewLayerTesting):
layer_collection_mom = layer.collections.link(scene_collection_mom)
layer_collection_kid = layer.collections.link(scene_collection_kid)
layer_collection_mom.hide = False
layer_collection_mom.collections[layer_collection_kid.name].hide = True
layer_collection_kid.hide = True
layer_collection_mom.enabled = True
layer_collection_mom.collections[layer_collection_kid.name].enabled = False
layer_collection_kid.enabled = False
bpy.context.scene.update() # update depsgraph
self.assertFalse(cube.visible_get(), "Object should be invisible")