Skip to content

Instantly share code, notes, and snippets.

@kellyegan
Created October 8, 2014 13:31
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save kellyegan/fb9d710bd20579771b40 to your computer and use it in GitHub Desktop.
Save kellyegan/fb9d710bd20579771b40 to your computer and use it in GitHub Desktop.
Blender addon to export each frame of an animation as an STL
bl_info = {
"name": "Export animation frames as mesh files",
"category": "Export",
}
import bpy
class frameExportMesh( bpy.types.Operator):
"""Export animation frames as mesh files."""
bl_idname = "frame.export_mesh"
bl_label = "Export frames as mesh files"
bl_options = {'REGISTER'}
def execute(self, context):
scene = context.scene
for frame in range( scene.frame_start, scene.frame_end):
scene.frame_set(frame)
scene.update()
the_path = bpy.path.abspath('//')
the_file = scene.name + "_" + str( scene.frame_current) + ".stl"
bpy.ops.export_mesh.stl(filepath = the_path + the_file)
return {'FINISHED'}
def register():
bpy.utils.register_class(frameExportMesh)
def unregister():
bpy.utils.unregister_class(frameExportMesh)
if __name__ == "__main__":
register()
@calimero31180
Copy link

Hello, I was so happy to find your addon. Unfortunately I can not run it. I installed it, and I selected it in "user preferences" but how can I start it then? I have an BVH animated figure and want to Export the STLs. There is no button or possibility in export to choose it

@beta-tester
Copy link

in 3d view port, press [SPACE]-key to enter the search menu and then type in "Export frames as mesh files".

@MrGONG0028
Copy link

Is it possible to export each frame as .ply file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment