From 035b455f6c60daa6266ccfa4f3205d79a2278769 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 17 Apr 2019 12:39:42 +0200 Subject: Tests: Fix ID properties test Simply adjust to Python API changes done in 2.8. --- tests/python/bl_pyapi_idprop_datablock.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/python/bl_pyapi_idprop_datablock.py b/tests/python/bl_pyapi_idprop_datablock.py index 8ff597dda31..5bb2155187c 100644 --- a/tests/python/bl_pyapi_idprop_datablock.py +++ b/tests/python/bl_pyapi_idprop_datablock.py @@ -98,14 +98,14 @@ def make_lib(): # make unique named copy of the cube ob = bpy.data.objects["Cube"].copy() - bpy.context.scene.objects.link(ob) + bpy.context.collection.objects.link(ob) bpy.data.objects["Cube.001"].name = "Unique_Cube" # duplicating of Cube for i in range(0, ob_cp_count): ob = bpy.data.objects["Cube"].copy() - bpy.context.scene.objects.link(ob) + bpy.context.collection.objects.link(ob) # nodes bpy.data.scenes["Scene"].use_nodes = True @@ -147,7 +147,7 @@ def check_lib_linking(): def check_linked_scene_copying(): # full copy of the scene with datablock props bpy.ops.wm.open_mainfile(filepath=test_path) - bpy.data.screens['Default'].scene = bpy.data.scenes["Scene_lib"] + bpy.context.window.scene = bpy.data.scenes["Scene_lib"] bpy.ops.scene.new(type='FULL_COPY') # check save/open @@ -155,7 +155,7 @@ def check_linked_scene_copying(): bpy.ops.wm.open_mainfile(filepath=test_path) intern_sce = get_scene(None, "Scene_lib") - extern_sce = get_scene("Lib", "Scene_lib") + extern_sce = get_scene("lib.blend", "Scene_lib") # check node's props # we made full copy from linked scene, so pointers must equal each other @@ -167,7 +167,7 @@ def check_linked_scene_copying(): def check_scene_copying(): # full copy of the scene with datablock props bpy.ops.wm.open_mainfile(filepath=lib_path) - bpy.data.screens['Default'].scene = bpy.data.scenes["Scene_lib"] + bpy.context.window.scene = bpy.data.scenes["Scene_lib"] bpy.ops.scene.new(type='FULL_COPY') path = test_path + "_" -- cgit v1.2.3