Importing COLLADA(.dae) file into blender using python

谁说我不能喝 提交于 2020-01-02 12:48:21

问题


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:


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.



来源:https://stackoverflow.com/questions/28992141/importing-collada-dae-file-into-blender-using-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!