1
2 """
3 VMDの読み込み
4 http://yumin3123.at.webry.info/200810/article_4.html
5 http://atupdate.web.fc2.com/vmd_format.htm
6 """
7 __author__="ousttrue"
8 __license__="zlib"
9 __versioon__="1.0.0"
10
11
12 import io
13 import os
14 import struct
15 from .. import common
16
17
19 """
20 morphing animation data.
21 """
22 __slots__=['name', 'frame', 'ratio']
27
30
31
33 """
34 bone animation data.
35 """
36 __slots__=['name', 'frame', 'pos', 'q', 'complement']
42
45
47 return '<BoneFrame "%s" %d %s%s>' % (self.name, self.frame, self.pos, self.q)
48
49
51 __slots__=[
52 'model_name',
53 'motions',
54 'shapes',
55 'cameras',
56 'lights',
57 'last_frame',
58 ]
66
68 return '<VMDLoader model: "%s", motion: %d, shape: %d, camera: %d, light: %d>' % (
69 self.model_name, len(self.motions), len(self.shapes),
70 len(self.cameras), len(self.lights))
71