0
$\begingroup$

I want to export every frame vertex positions something like this:

Frame 1
<Vector (1.0016, 1.0085, 1.0011)>
<Vector (1.0000, 1.0000, -1.0000)>
<Vector (1.0196, -1.0437, 0.9638)>
Frame 2
<Vector (1.0061, 1.0334, 1.0044)>
<Vector (1.0000, 1.0000, -1.0000)>
<Vector (1.0148, -1.0692, 0.9606)>
Frame 3
<Vector (1.0134, 1.0734, 1.0097)>
<Vector (1.0000, 1.0000, -1.0000)>
<Vector (1.0071, -1.1103, 0.9555)>
Frame 4
<Vector (1.0355, 1.1941, 1.0257)>
<Vector (1.0000, 1.0000, -1.0000)>
<Vector (0.9837, -1.2344, 0.9400)>
$\endgroup$
1
$\begingroup$

you can use for-loop to export every frame positions:

import bpy

sce = bpy.context.scene
f = open("props.txt", "w")
for frame in range(sce.frame_start, sce.frame_end+1):
    sce.frame_set(frame)

    
    me = bpy.context.object.data   
    print("Frame %i" % frame, file=f)     
    for v in me.vertices:
     print(v.co.xyz, file=f)
 
f.close()
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.