

In a real exporter, you might not iterator over the vertices directly, but over the faces but I assume, you know these things and only the animation-related part is new to you. Obviously, this script is only to show how to get to the relevant information. Note: the world-matrix of the object contains the current rotation, scaling and translation transforms due to the active frame of the animation sequence.

# Transform each vertex with the current world-matrix (start_frame, end_frame) = o.animation_rangeįor f in range(int(start_frame), int(end_frame) + 1):
# Get index of the first and last frame of the animation The essential steps to access the transformed vertices are as follows: # Get the active object Let’s also assume the object is currently selected and active. by manually setting keyframes on some object or by recording some physics-based animation with the Blender Game Engine. Let’s assume you have defined an animation on some object in blender. More specifically, how to export the transformed vertices for every frame of the animation. what are the main data-paths to get animation data. Note that this post assumes that you are familiar with Blender’s Python API and thus only gives the most essential information to get you started. While collecting the essential snippets, I though, I might as well put it in a short post in case it can help somebody else. Just got asked how to export animations from within Blender.
