Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_a.py1
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_b.py1
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_c.py1
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_d.py1
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_e.py1
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_f.py3
-rw-r--r--tests/python/view_layer/test_evaluation_visibility_a.py1
-rw-r--r--tests/python/view_layer/test_evaluation_visibility_b.py1
-rw-r--r--tests/python/view_layer/test_evaluation_visibility_c.py1
-rw-r--r--tests/python/view_layer/test_evaluation_visibility_d.py1
-rw-r--r--tests/python/view_layer/test_evaluation_visibility_e.py1
-rw-r--r--tests/python/view_layer/test_evaluation_visibility_f.py1
-rw-r--r--tests/python/view_layer/test_object_copy.py1
-rw-r--r--tests/python/view_layer/test_object_link_b.py1
-rw-r--r--tests/python/view_layer/test_operator_context.py2
-rw-r--r--tests/python/view_layer/view_layer_common.py2
16 files changed, 2 insertions, 18 deletions
diff --git a/tests/python/view_layer/test_evaluation_selectability_a.py b/tests/python/view_layer/test_evaluation_selectability_a.py
index bd80f638ef4..f862ca55c86 100644
--- a/tests/python/view_layer/test_evaluation_selectability_a.py
+++ b/tests/python/view_layer/test_evaluation_selectability_a.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Selectability Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_selectability_b.py b/tests/python/view_layer/test_evaluation_selectability_b.py
index a220d89445e..91f5dc3de2b 100644
--- a/tests/python/view_layer/test_evaluation_selectability_b.py
+++ b/tests/python/view_layer/test_evaluation_selectability_b.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Selectability Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_selectability_c.py b/tests/python/view_layer/test_evaluation_selectability_c.py
index e551310cbbe..c1ce5dba815 100644
--- a/tests/python/view_layer/test_evaluation_selectability_c.py
+++ b/tests/python/view_layer/test_evaluation_selectability_c.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Selectability Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_selectability_d.py b/tests/python/view_layer/test_evaluation_selectability_d.py
index 76adf12c666..1af8a0dbd59 100644
--- a/tests/python/view_layer/test_evaluation_selectability_d.py
+++ b/tests/python/view_layer/test_evaluation_selectability_d.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Selectability Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_selectability_e.py b/tests/python/view_layer/test_evaluation_selectability_e.py
index 970c1cdd9d2..54df1e9b59b 100644
--- a/tests/python/view_layer/test_evaluation_selectability_e.py
+++ b/tests/python/view_layer/test_evaluation_selectability_e.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Selectability Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_selectability_f.py b/tests/python/view_layer/test_evaluation_selectability_f.py
index 54a070e4ae9..fbc4a49fc11 100644
--- a/tests/python/view_layer/test_evaluation_selectability_f.py
+++ b/tests/python/view_layer/test_evaluation_selectability_f.py
@@ -17,10 +17,11 @@ class UnitTesting(ViewLayerTesting):
def test_selectability(self):
import bpy
scene = bpy.context.scene
+ view_layer = bpy.context.view_layer
cube = bpy.data.objects.new('guinea pig', bpy.data.meshes.new('mesh'))
scene_collection = scene.master_collection.collections.new('collection')
- layer_collection = scene.view_layers.active.collections.link(scene_collection)
+ layer_collection = view_layer.collections.link(scene_collection)
bpy.context.scene.update() # update depsgraph
diff --git a/tests/python/view_layer/test_evaluation_visibility_a.py b/tests/python/view_layer/test_evaluation_visibility_a.py
index c1e6a427210..666513fa85a 100644
--- a/tests/python/view_layer/test_evaluation_visibility_a.py
+++ b/tests/python/view_layer/test_evaluation_visibility_a.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Visibility Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_visibility_b.py b/tests/python/view_layer/test_evaluation_visibility_b.py
index a6859ba31ec..c24b7a73dab 100644
--- a/tests/python/view_layer/test_evaluation_visibility_b.py
+++ b/tests/python/view_layer/test_evaluation_visibility_b.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Visibility Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_visibility_c.py b/tests/python/view_layer/test_evaluation_visibility_c.py
index 8c88a045c99..5a8c6386265 100644
--- a/tests/python/view_layer/test_evaluation_visibility_c.py
+++ b/tests/python/view_layer/test_evaluation_visibility_c.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Visibility Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_visibility_d.py b/tests/python/view_layer/test_evaluation_visibility_d.py
index 1836fae9802..6a5f660edde 100644
--- a/tests/python/view_layer/test_evaluation_visibility_d.py
+++ b/tests/python/view_layer/test_evaluation_visibility_d.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Visibility Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_visibility_e.py b/tests/python/view_layer/test_evaluation_visibility_e.py
index f05d797ecdc..16e08cfaba7 100644
--- a/tests/python/view_layer/test_evaluation_visibility_e.py
+++ b/tests/python/view_layer/test_evaluation_visibility_e.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Visibility Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_evaluation_visibility_f.py b/tests/python/view_layer/test_evaluation_visibility_f.py
index 9034d0ce6f8..cf886786c5e 100644
--- a/tests/python/view_layer/test_evaluation_visibility_f.py
+++ b/tests/python/view_layer/test_evaluation_visibility_f.py
@@ -26,7 +26,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Visibility Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
window.view_layer = layer
scene_collection_mom = scene.master_collection.collections.new("Mom")
diff --git a/tests/python/view_layer/test_object_copy.py b/tests/python/view_layer/test_object_copy.py
index a15b9e2c941..15d863f3138 100644
--- a/tests/python/view_layer/test_object_copy.py
+++ b/tests/python/view_layer/test_object_copy.py
@@ -41,7 +41,6 @@ class UnitTesting(ViewLayerTesting):
layer = scene.view_layers.new('Fresh new Layer')
layer.collections.link(subzero)
- scene.view_layers.active_index = len(scene.view_layers) - 1
bpy.context.window.view_layer = bpy.context.scene.view_layers['Fresh new Layer']
if mode == 'DUPLICATE':
diff --git a/tests/python/view_layer/test_object_link_b.py b/tests/python/view_layer/test_object_link_b.py
index 361ea7fc3a5..8a78251a167 100644
--- a/tests/python/view_layer/test_object_link_b.py
+++ b/tests/python/view_layer/test_object_link_b.py
@@ -19,7 +19,6 @@ class UnitTesting(ViewLayerTesting):
See if we can link objects via bpy.context.scene_collection
"""
import bpy
- bpy.context.scene.view_layers.active_index = len(bpy.context.scene.view_layers) - 1
bpy.context.window.view_layer = bpy.context.scene.view_layers['Viewport']
master_collection = bpy.context.scene_collection
self.do_object_link(master_collection)
diff --git a/tests/python/view_layer/test_operator_context.py b/tests/python/view_layer/test_operator_context.py
index 34f46c963bb..38379aa2a75 100644
--- a/tests/python/view_layer/test_operator_context.py
+++ b/tests/python/view_layer/test_operator_context.py
@@ -90,8 +90,6 @@ class UnitTesting(ViewLayerTesting):
# Change active scene layer (do it for window too just to don't get mangled in window bugs)
scene = bpy.context.scene
- scene.view_layers.active_index = len(scene.view_layers) - 2
- self.assertEqual(scene.view_layers.active.name, "Viewport")
bpy.context.window.view_layer = bpy.context.scene.view_layers['Viewport']
# old layer
diff --git a/tests/python/view_layer/view_layer_common.py b/tests/python/view_layer/view_layer_common.py
index df47e72c327..8dcc094a1c6 100644
--- a/tests/python/view_layer/view_layer_common.py
+++ b/tests/python/view_layer/view_layer_common.py
@@ -452,7 +452,6 @@ class ViewLayerTesting(unittest.TestCase):
# real test
layer = scene.view_layers.new('Visibility Test')
layer.collections.unlink(layer.collections[0])
- scene.view_layers.active = layer
scene_collection = scene.master_collection.collections.new("Collection")
layer.collections.link(scene_collection)
@@ -770,7 +769,6 @@ class Clay:
layer = self._scene.view_layers.new('Evaluation Test')
layer.collections.unlink(layer.collections[0])
- self._scene.view_layers.active = layer
bpy.context.window.view_layer = layer
# remove all other layers