[Bf-blender-cvs] [1d8279fd8db] blender2.8: Alembic: made bl_alembic_import_test.py run again
Sybren A. Stüvel
noreply at git.blender.org
Tue Jun 12 15:11:22 CEST 2018
Commit: 1d8279fd8db92b2fd03b2925d68bf7691b456963
Author: Sybren A. Stüvel
Date: Fri Jun 8 17:14:44 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1d8279fd8db92b2fd03b2925d68bf7691b456963
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.
===================================================================
M tests/python/bl_alembic_import_test.py
===================================================================
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)
More information about the Bf-blender-cvs
mailing list