Skip to content

Instantly share code, notes, and snippets.

Created September 28, 2012 15:42
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Obj to dae Blender
# simple script to batch convert collada to obj.
# run as:
# blender --background --python -- input_dir output_dir
import os
import sys
import glob
import bpy
if len(sys.argv) != 7:
print("Must provide input and output path")
for infile in glob.glob(os.path.join(sys.argv[5], '*.dae')):
outfilename = os.path.splitext(os.path.split(infile)[1])[0] + ".obj"
bpy.ops.export_scene.obj(filepath=os.path.join(sys.argv[6], outfilename))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment