Created
October 8, 2014 13:31
-
-
Save kellyegan/fb9d710bd20579771b40 to your computer and use it in GitHub Desktop.
Blender addon to export each frame of an animation as an STL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
in 3d view port, press [SPACE]-key to enter the search menu and then type in "Export frames as mesh files".
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
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