forked from bartvdbraak/blender
Fix T51762: Unit test script_alembic_import is failing.
Implemented workaround for use with the legacy depsgraph.
This commit is contained in:
parent
7461bb3f52
commit
81775e1920
@ -474,6 +474,7 @@ if(WITH_ALEMBIC)
|
|||||||
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
|
||||||
--
|
--
|
||||||
--testdir "${TEST_SRC_DIR}/alembic"
|
--testdir "${TEST_SRC_DIR}/alembic"
|
||||||
|
--with-legacy-depsgraph=${WITH_LEGACY_DEPSGRAPH}
|
||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
@ -487,6 +488,7 @@ if(WITH_ALEMBIC)
|
|||||||
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
|
||||||
--
|
--
|
||||||
--testdir "${TEST_SRC_DIR}/alembic"
|
--testdir "${TEST_SRC_DIR}/alembic"
|
||||||
|
--with-legacy-depsgraph=${WITH_LEGACY_DEPSGRAPH}
|
||||||
)
|
)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
@ -129,6 +129,9 @@ class SimpleImportTest(AbstractAlembicTest):
|
|||||||
bpy.data.cache_files[fname].filepath = relpath.replace('1.abc', '2.abc')
|
bpy.data.cache_files[fname].filepath = relpath.replace('1.abc', '2.abc')
|
||||||
bpy.context.scene.update()
|
bpy.context.scene.update()
|
||||||
|
|
||||||
|
if args.with_legacy_depsgraph:
|
||||||
|
bpy.context.scene.frame_set(10)
|
||||||
|
|
||||||
x, y, z = cube.matrix_world.to_euler('XYZ')
|
x, y, z = cube.matrix_world.to_euler('XYZ')
|
||||||
self.assertAlmostEqual(x, math.pi / 2, places=5)
|
self.assertAlmostEqual(x, math.pi / 2, places=5)
|
||||||
self.assertAlmostEqual(y, 0)
|
self.assertAlmostEqual(y, 0)
|
||||||
@ -213,6 +216,8 @@ def main():
|
|||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('--testdir', required=True, type=pathlib.Path)
|
parser.add_argument('--testdir', required=True, type=pathlib.Path)
|
||||||
|
parser.add_argument('--with-legacy-depsgraph', default=False,
|
||||||
|
type=lambda v: v in {'ON', 'YES', 'TRUE'})
|
||||||
args, remaining = parser.parse_known_args(argv)
|
args, remaining = parser.parse_known_args(argv)
|
||||||
|
|
||||||
unittest.main(argv=remaining)
|
unittest.main(argv=remaining)
|
||||||
|
Loading…
Reference in New Issue
Block a user