Is it possible to store each animation frame as a new object? I searched quite a long time now on google and was wondering that I cannot find any information about this.
I just have a simple model with a simple pose animation and I'm looking for a way to get each frame stored as a new object, that I end up with maybe 100 objects "frame001", "frame002", "frame003", ...
I need this for a game engine that does not support bone animations, but I can fake such an animation by exporting this object (as a collada) and then setting only one of the "frame-objects" visible in this engine.
I tried to write a quick and dirty python script myself after some basic reading, but unfortunately the most important action (the conversion to a mesh) does not work:
import bpy
count=0
for x in range(bpy.data.scenes["Scene"].frame_start,bpy.data.scenes["Scene"].frame_end):
bpy.ops.object.duplicate_move()
bpy.ops.object.select_all(action='DESELECT')
obs = bpy.data.objects
bpy.data.scenes["Scene"].frame_current=0
for ob in obs:
bpy.ops.object.select_all(action='DESELECT')
if ob.type == 'MESH' and ob.name.startswith("model"):
if count>0:
ob.select=True
bpy.ops.object.convert(target='MESH')
bpy.data.scenes["Scene"].frame_current+=1
count=count+1