Rename any instance of scene layer or render layer in code with view layer
[blender.git] / tests / python / view_layer / test_object_copy.py
similarity index 90%
rename from tests/python/render_layer/test_object_copy.py
rename to tests/python/view_layer/test_object_copy.py
index 1e6e9e5b8894e933ce9b910d0dd17349c567ddf0..eab2c73f3b3c12323fc8edb5a5b80b33185a7dd9 100644 (file)
@@ -6,14 +6,14 @@ import unittest
 import os
 import sys
 
-from render_layer_common import *
+from view_layer_common import *
 
 
 # ############################################################
 # Testing
 # ############################################################
 
-class UnitTesting(RenderLayerTesting):
+class UnitTesting(ViewLayerTesting):
     def do_object_copy(self, mode):
         import bpy
         import os
@@ -38,11 +38,11 @@ class UnitTesting(RenderLayerTesting):
             scorpion = subzero.collections.new('scorpion')
             subzero.objects.link(three_b)
             scorpion.objects.link(three_c)
-            layer = scene.render_layers.new('Fresh new Layer')
+            layer = scene.view_layers.new('Fresh new Layer')
             layer.collections.link(subzero)
 
-            scene.render_layers.active_index = len(scene.render_layers) - 1
-            bpy.context.workspace.render_layer = bpy.context.scene.render_layers['Fresh new Layer']
+            scene.view_layers.active_index = len(scene.view_layers) - 1
+            bpy.context.workspace.view_layer = bpy.context.scene.view_layers['Fresh new Layer']
 
             if mode == 'DUPLICATE':
                 # assuming the latest layer is the active layer