diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-04-17 13:39:42 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-04-17 18:32:36 +0300 |
commit | 035b455f6c60daa6266ccfa4f3205d79a2278769 (patch) | |
tree | cb2c6e68a995fe938201ad970d2ee34d087379bd /tests | |
parent | 5461a68852d746498ac29eb06b8e12f79519ad79 (diff) |
Tests: Fix ID properties test
Simply adjust to Python API changes done in 2.8.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/python/bl_pyapi_idprop_datablock.py | 10 |
1 files changed, 5 insertions, 5 deletions
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 + "_" |