blender import/export script

巧了我就是萌 提交于 2019-11-28 11:56:44

问题


I should create a python script for Blender that imports obj and exports obj removing all texture sections. I never used blender, is there a good tutorial for scratch the surface and achieve this simple task?

thank you


回答1:


The blender python api website includes several tutorials to learn using python in blender. You can find details of the obj importer and exporter options. The obj import/export is handled by a python addon that is included with blender.

You could start with something as simple as -

import bpy,os
for f in os.listdir('/path/to/use'):
    bpy.ops.import_scene.obj(filepath=f)
    bpy.ops.export_scene.obj(filepath=f,use_materials=False)

If you need more help, blender has it's own SE site that is better for blender specific scripting.



来源:https://stackoverflow.com/questions/41926423/blender-import-export-script

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