X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_armature.py;h=f3f18c8adcb1c8f2cf1c2e20bfb93535012c1cd2;hp=1d70b591c3554cd86fd1d11b85bd5988324917fe;hb=912ae952489699769be43f90d4478263461964a4;hpb=e37851b98dde5082ee92570354746f2f92e21940 diff --git a/blender/io_mspgl/export_armature.py b/blender/io_mspgl/export_armature.py index 1d70b591..f3f18c8a 100644 --- a/blender/io_mspgl/export_armature.py +++ b/blender/io_mspgl/export_armature.py @@ -1,7 +1,5 @@ -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") @@ -11,7 +9,9 @@ class ArmatureExporter: 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)