Implement #142: Add support for SCALEKEYS
This commit is contained in:
@@ -37,3 +37,29 @@ def test_psa_import_all():
|
||||
EXPECTED_ACTION_COUNT = 135
|
||||
assert len(bpy.data.actions) == EXPECTED_ACTION_COUNT, \
|
||||
f"Expected {EXPECTED_ACTION_COUNT} actions, but found {len(bpy.data.actions)}."
|
||||
|
||||
|
||||
def test_psa_import_convert_to_samples():
|
||||
assert bpy.ops.psk.import_file(
|
||||
filepath=SHREK_PSK_FILEPATH,
|
||||
components='ALL',
|
||||
) == {'FINISHED'}, "PSK import failed."
|
||||
|
||||
armature_object = bpy.data.objects.get('Shrek', None)
|
||||
assert armature_object is not None, "Armature object not found in the scene."
|
||||
assert armature_object.type == 'ARMATURE', "Object is not of type ARMATURE."
|
||||
|
||||
# Select the armature object
|
||||
bpy.context.view_layer.objects.active = armature_object
|
||||
armature_object.select_set(True)
|
||||
|
||||
# Import the associated PSA file with import_all operator, and convert to samples.
|
||||
assert bpy.ops.psa.import_all(
|
||||
filepath=SHREK_PSA_FILEPATH,
|
||||
should_convert_to_samples=True
|
||||
) == {'FINISHED'}, "PSA import failed."
|
||||
|
||||
# TODO: More thorough tests on the imported data for the animations.
|
||||
EXPECTED_ACTION_COUNT = 135
|
||||
assert len(bpy.data.actions) == EXPECTED_ACTION_COUNT, \
|
||||
f"Expected {EXPECTED_ACTION_COUNT} actions, but found {len(bpy.data.actions)}."
|
||||
@@ -1,3 +1,3 @@
|
||||
pytest
|
||||
pytest-cov
|
||||
psk-psa-py
|
||||
psk-psa-py == 0.0.4
|
||||
|
||||
Reference in New Issue
Block a user