4
votes

I got a project in which I've to import different files into blender. I am just a starter to blender and it's python API. I am looking for a way to import .dae file into blender using a python script. Until now I've been unsuccessful to find an import module in python for blender.

Can anyone point me in the right direction?

1

1 Answers

8
votes

While most import/export operators can be found in bpy.ops such as bpy.ops.import_mesh.obj() the collada import/export operators are under bpy.ops.wm. The importer is bpy.ops.wm.collada_import(filepath="").

If your automating the import of many files you will want to use bpy.ops.wm.save_mainfile(filepath="") to save each one as you go.