Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-06-08 18:14:44 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-06-12 16:10:15 +0300
commit1d8279fd8db92b2fd03b2925d68bf7691b456963 (patch)
treec7784c318c237c6cddbd7492b1b5282e6a5134dd /tests
parent4bfc7b9e7d80c269921f7847732b7b7a3c3412e9 (diff)
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/python/bl_alembic_import_test.py12
1 files changed, 6 insertions, 6 deletions
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)