aboutsummaryrefslogtreecommitdiff
path: root/mstamp.py
diff options
context:
space:
mode:
Diffstat (limited to 'mstamp.py')
-rw-r--r--mstamp.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/mstamp.py b/mstamp.py
index 87b896a..6090ae5 100644
--- a/mstamp.py
+++ b/mstamp.py
@@ -108,10 +108,11 @@ scn.objects.unlink(stamp)
scn.objects.unlink(bar)
scn.objects.unlink(base)
-# export to Collada
-bpy.ops.wm.collada_export(filepath=sys.argv[4], selected=True, apply_modifiers=True)
-
-# export to STL
-#bpy.ops.export_mesh.stl(filepath=sys.argv[4], check_existing=False, ascii=True, use_mesh_modifiers=True)
+if(sys.argv[4].endswith(".dae")):
+ # export to Collada
+ bpy.ops.wm.collada_export(filepath=sys.argv[4], selected=True, apply_modifiers=True)
+elif(sys.argv[4].endswith(".stl")):
+ # export to STL
+ bpy.ops.export_mesh.stl(filepath=sys.argv[4], check_existing=False, ascii=True, use_mesh_modifiers=True)
bpy.ops.wm.quit_blender()