X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_armature.py;h=f3f18c8adcb1c8f2cf1c2e20bfb93535012c1cd2;hb=1a561b4e8d77fd14711b2304152e0b2408a49fdf;hp=1d70b591c3554cd86fd1d11b85bd5988324917fe;hpb=b61c103559c83d6fe7309f2ca4489f09e701c4cf;p=libs%2Fgl.git 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)