[Bf-blender-cvs] [b4d44b98e8c] blender2.8: Alembic: Adjusted unit test for Blender 2.8 to use scene layers.

Sybren A. Stüvel noreply at git.blender.org
Wed Aug 9 15:09:09 CEST 2017


Commit: b4d44b98e8c2e1990f2634b28527ddd71b454ddf
Author: Sybren A. Stüvel
Date:   Wed Aug 9 15:06:50 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBb4d44b98e8c2e1990f2634b28527ddd71b454ddf

Alembic: Adjusted unit test for Blender 2.8 to use scene layers.

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

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 65a0867d5c1..e64da2fe540 100644
--- a/tests/python/bl_alembic_import_test.py
+++ b/tests/python/bl_alembic_import_test.py
@@ -183,17 +183,19 @@ class SimpleImportTest(AbstractAlembicTest):
 
         # Check that the file loaded ok.
         bpy.context.scene.frame_set(6)
-        mesh = plane.to_mesh(bpy.context.scene, True, 'RENDER')
+        scene = bpy.context.scene
+        layer = scene.render_layers[scene.active_layer]
+        mesh = plane.to_mesh(scene, layer, True, 'RENDER')
         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)
 
         # Change path from absolute to relative. This should not break the animation.
-        bpy.context.scene.frame_set(1)
+        scene.frame_set(1)
         bpy.data.cache_files[fname].filepath = relpath
-        bpy.context.scene.frame_set(6)
+        scene.frame_set(6)
 
-        mesh = plane.to_mesh(bpy.context.scene, True, 'RENDER')
+        mesh = plane.to_mesh(scene, layer, True, 'RENDER')
         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