From 313c2e910506d4fdccf27c7593eb8518f7dff8b5 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 30 Nov 2022 15:04:36 +0100 Subject: [PATCH] Fix a test after recent changes to lib (in)directly linked ID handling. rB133dde41bb5b changed handling of (in)directly linked status handling for IDs, now IDs that are not directly linked get proper status and handling on file save. this broke parts of the `pyapi_idprop_datablock` tests. --- tests/python/bl_pyapi_idprop_datablock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/python/bl_pyapi_idprop_datablock.py b/tests/python/bl_pyapi_idprop_datablock.py index 42c9ec1b16f..ba545aee151 100644 --- a/tests/python/bl_pyapi_idprop_datablock.py +++ b/tests/python/bl_pyapi_idprop_datablock.py @@ -146,6 +146,8 @@ def check_lib_linking(): with bpy.data.libraries.load(lib_path, link=True) as (data_from, data_to): data_to.scenes = ["Scene_lib"] + bpy.context.window.scene = bpy.data.scenes["Scene_lib"] + o = bpy.data.scenes["Scene_lib"].objects['Unique_Cube'] expect_false_or_abort(o.prop_array[0].test_prop == bpy.data.scenes["Scene_lib"].objects['Light']) @@ -158,9 +160,10 @@ 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.context.window.scene = bpy.data.scenes["Scene_lib"] bpy.ops.scene.new(type='FULL_COPY') + bpy.context.window.scene = get_scene("lib.blend", "Scene_lib") + # check save/open bpy.ops.wm.save_as_mainfile(filepath=test_path) bpy.ops.wm.open_mainfile(filepath=test_path)