Merge remote-tracking branch 'origin/master' into blender2.8

This commit is contained in:
Dalai Felinto
2017-06-21 15:14:42 +02:00
16 changed files with 66 additions and 55 deletions

View File

@@ -468,12 +468,13 @@ if(WITH_ALEMBIC)
--testdir "${TEST_SRC_DIR}/alembic"
--alembic-root "${ALEMBIC_ROOT_DIR}"
)
add_test(NAME script_alembic_import
COMMAND
"$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
add_test(NAME script_alembic_import
COMMAND
"$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
--
--testdir "${TEST_SRC_DIR}/alembic"
--with-legacy-depsgraph=${WITH_LEGACY_DEPSGRAPH}
)
else()
@@ -487,6 +488,7 @@ if(WITH_ALEMBIC)
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
--
--testdir "${TEST_SRC_DIR}/alembic"
--with-legacy-depsgraph=${WITH_LEGACY_DEPSGRAPH}
)
endif()

View File

@@ -157,6 +157,8 @@ class AbstractAlembicTest(unittest.TestCase):
if proptype == 'CompoundProperty':
# To read those, call self.abcprop() on it.
continue
if len(parts) < 2:
raise ValueError('Error parsing result from abcprop: %s', info.strip())
valtype_and_arrsize, name_and_extent = parts[1:]
# Parse name and extent

View File

@@ -129,6 +129,9 @@ class SimpleImportTest(AbstractAlembicTest):
bpy.data.cache_files[fname].filepath = relpath.replace('1.abc', '2.abc')
bpy.context.scene.update()
if args.with_legacy_depsgraph:
bpy.context.scene.frame_set(10)
x, y, z = cube.matrix_world.to_euler('XYZ')
self.assertAlmostEqual(x, math.pi / 2, places=5)
self.assertAlmostEqual(y, 0)
@@ -213,6 +216,8 @@ def main():
parser = argparse.ArgumentParser()
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)
unittest.main(argv=remaining)

View File

@@ -36,6 +36,9 @@ BLACKLIST = {
"cycles",
"io_export_dxf", # TODO, check on why this fails
'io_import_dxf', # Because of cydxfentity.so dependency
# The unpacked wheel is only loaded when actually used, not directly on import:
"io_blend_utils/blender_bam-unpacked.whl",
}
# Some modules need to add to the `sys.path`.
@@ -211,11 +214,10 @@ def load_modules():
[(os.sep + f + ".py") for f in BLACKLIST])
for f in source_files:
ok = False
for ignore in ignore_paths:
if ignore in f:
ok = True
if not ok:
break
else:
raise Exception("Source file %r not loaded in test" % f)
print("loaded %d modules" % len(loaded_files))