fork download
  1. import bpy
  2.  
  3. destfolder = "d:\\test\\"
  4.  
  5. sce = bpy.data.scenes['Scene']
  6. for ob in sce.objects:
  7. if ob.select_get():
  8. bpy.ops.object.select_pattern(pattern = ob.name)
  9. bpy.ops.export_scene.obj(filepath = destfolder + ob.name + ".obj", use_selection = True)
  10.  
Runtime error #stdin #stdout #stderr 0.12s 23468KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
ModuleNotFoundError: No module named 'bpy'