Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing COLLADA(.dae) file into blender using python

Tags:

python

blender

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?

like image 512
Mj1992 Avatar asked Feb 10 '23 17:02

Mj1992


1 Answers

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.

like image 92
sambler Avatar answered Feb 13 '23 07:02

sambler