forked from amorilia/blender_nif_plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathruntest_ob_animation.py
34 lines (29 loc) · 1.21 KB
/
runtest_ob_animation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""Automated animation tests for the blender nif scripts."""
import os.path
from nif_test import TestSuite
from nif_common import NifFormat
# some tests to import and export nif files
# as list of (filename, config dictionary, list of objects to be selected)
# if the config has a EXPORT_VERSION key then the test is an export test
# otherwise it's an import test
class TestSuiteAnimation(TestSuite):
def run(self):
ob_male = os.path.join(
self.config.get("path", "oblivion"),
"meshes", "characters", "_male")
self.test(
filename=os.path.join(ob_male, 'skeleton.nif'),
config=dict(
# we also import havok, for regression testing
# uncomment next line for testing without havok
#IMPORT_SKELETON=1,
IMPORT_KEYFRAMEFILE=os.path.join(ob_male, 'castself.kf')))
self.test(
filename='test/nif/_castself.kf',
config=dict(
EXPORT_VERSION = 'Oblivion',
EXPORT_ANIMATION = 2, # animation only
EXPORT_OB_LAYER = NifFormat.OblivionLayer.OL_BIPED),
selection=['Scene Root'])
suite = TestSuiteAnimation("animation")
suite.run()