-from .outfile import OutFile
-
class ArmatureExporter:
- def export(self, context, fn):
+ def export(self, context, out_file):
obj = context.active_object
if obj.type!="ARMATURE":
raise Exception("Can only export Armature data")
armature = Armature(obj.data)
armature.sort_links()
- out_file = OutFile(fn)
+ from .outfile import open_outfile
+ out_file = open_outfile(out_file)
+
for l in armature.links:
out_file.begin("link", '"{}"'.format(l.name))
out_file.write("index", l.index)