OSDN Git Service

refactoring export_pmd
[meshio/pymeshio.git] / blender26-meshio / export_pmx.py
old mode 100755 (executable)
new mode 100644 (file)
index 12c86a3..1f6b165
@@ -1,5 +1,18 @@
 # coding: utf-8
 
-def write(self, path):
-    pass
+from . import bl
+
+
+def _execute(filepath):
+    print(filepath)
+    active=bl.object.getActive()
+    if not active:
+        print("abort. no active object.")
+        return
+    exporter=PmdExporter()
+    exporter.setup()
+    print(exporter)
+    exporter.write(filepath)
+    bl.object.activate(active)
+    return {'FINISHED'}