unittests: Update (fix) unittests after workspace API change

Tests were broken since e8c15e0ed1.

We now get view_layer from window, not workspace, since the same workspace can
have a different view_layer depending on the window scene.
This commit is contained in:
Dalai Felinto
2017-12-01 16:08:45 -02:00
parent e9cf3fae8e
commit aa0c9867b2
15 changed files with 27 additions and 27 deletions

View File

@@ -760,7 +760,7 @@ class Clay:
layer = self._scene.view_layers.new('Evaluation Test')
layer.collections.unlink(layer.collections[0])
self._scene.view_layers.active = layer
bpy.context.workspace.view_layer = layer
bpy.context.window.view_layer = layer
# remove all other layers
for layer_iter in self._scene.view_layers: