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