]> git.tdb.fi Git - libs/gl.git/blob - blender/io_mspgl/export_armature.py
Change default binding ranges to match lowest OpenGL standard
[libs/gl.git] / blender / io_mspgl / export_armature.py
1 class ArmatureExporter:
2         def export_armature(self, obj):
3                 if obj.type!="ARMATURE":
4                         raise ValueError("Object {} is not an armature".format(obj))
5
6                 from .armature import Armature
7                 armature = Armature(obj.data)
8                 armature.sort_links()
9
10                 from .datafile import Statement
11                 statements = []
12
13                 for l in armature.links:
14                         st = Statement("link", l.name)
15                         st.sub.append(Statement("index", l.index))
16                         if l.parent:
17                                 st.sub.append(Statement("parent", l.parent.name))
18                         st.sub.append(Statement("base", *tuple(l.base)))
19                         statements.append(st)
20
21                 return statements