From 1d8279fd8db92b2fd03b2925d68bf7691b456963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 8 Jun 2018 17:14:44 +0200 Subject: Alembic: made bl_alembic_import_test.py run again Two tests are still failing, but at least the API changes in 2.8 have been applied now. --- tests/python/bl_alembic_import_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/python') diff --git a/tests/python/bl_alembic_import_test.py b/tests/python/bl_alembic_import_test.py index e9499fb08f0..a96c8f6fdb3 100644 --- a/tests/python/bl_alembic_import_test.py +++ b/tests/python/bl_alembic_import_test.py @@ -61,9 +61,9 @@ class SimpleImportTest(AbstractAlembicTest): as_background_job=False) self.assertEqual({'FINISHED'}, res) - # The objects should be linked to scene_collection in Blender 2.8, + # The objects should be linked to scene.collection in Blender 2.8, # and to scene in Blender 2.7x. - objects = bpy.context.scene_collection.objects + objects = bpy.context.scene.collection.objects self.assertEqual(13, len(objects)) # Test the hierarchy. @@ -81,9 +81,9 @@ class SimpleImportTest(AbstractAlembicTest): as_background_job=False) self.assertEqual({'FINISHED'}, res) - # The objects should be linked to scene_collection in Blender 2.8, + # The objects should be linked to scene.collection in Blender 2.8, # and to scene in Blender 2.7x. - objects = bpy.context.scene_collection.objects + objects = bpy.context.scene.collection.objects # ABC parent is top-level object, which translates to nothing in Blender self.assertIsNone(objects['locator1'].parent) @@ -185,7 +185,7 @@ class SimpleImportTest(AbstractAlembicTest): bpy.context.scene.frame_set(6) scene = bpy.context.scene layer = scene.view_layers[scene.active_layer] - mesh = plane.to_mesh(scene, layer, True, 'RENDER') + mesh = plane.to_mesh(bpy.context.depsgraph, True, True, False) self.assertAlmostEqual(-1, mesh.vertices[0].co.x) self.assertAlmostEqual(-1, mesh.vertices[0].co.y) self.assertAlmostEqual(0.5905638933181763, mesh.vertices[0].co.z) @@ -195,7 +195,7 @@ class SimpleImportTest(AbstractAlembicTest): bpy.data.cache_files[fname].filepath = relpath scene.frame_set(6) - mesh = plane.to_mesh(scene, layer, True, 'RENDER') + mesh = plane.to_mesh(bpy.context.depsgraph, True, True, False) self.assertAlmostEqual(1, mesh.vertices[3].co.x) self.assertAlmostEqual(1, mesh.vertices[3].co.y) self.assertAlmostEqual(0.5905638933181763, mesh.vertices[3].co.z) -- cgit v1.2.3