Skip to content

Instantly share code, notes, and snippets.

@kashimAstro
Created September 16, 2016 09:44
Show Gist options
  • Select an option

  • Save kashimAstro/e30546826776cd16fbf09a77e47872a4 to your computer and use it in GitHub Desktop.

Select an option

Save kashimAstro/e30546826776cd16fbf09a77e47872a4 to your computer and use it in GitHub Desktop.
Blender export .STL separate mesh fracture
import bpy
import os
path = bpy.path.abspath('/tecnici/dario/teststl/')
if not os.path.exists(path):
os.makedirs(path)
for object in bpy.context.selected_objects:
bpy.ops.object.select_all(action='DESELECT')
object.select = True
fPath = str((path + object.name + '.stl'))
bpy.ops.export_mesh.stl(filepath=fPath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment