[Bf-blender-cvs] [313c2e91050] master: Fix a test after recent changes to lib (in)directly linked ID handling.

Bastien Montagne noreply at git.blender.org
Wed Nov 30 15:08:22 CET 2022


Commit: 313c2e910506d4fdccf27c7593eb8518f7dff8b5
Author: Bastien Montagne
Date:   Wed Nov 30 15:04:36 2022 +0100
Branches: master
https://developer.blender.org/rB313c2e910506d4fdccf27c7593eb8518f7dff8b5

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.

===================================================================

M	tests/python/bl_pyapi_idprop_datablock.py

===================================================================

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)



More information about the Bf-blender-cvs mailing list