i like to measure the distance a object has traveled over time. But i fail already at saving the current vector. The result for test and location are always (except first frame change where test = At any other frame change test and location show equal results. Where is my mistake?
import bpy
from mathutils import *
from math import *
test = Vector((0,0,0))
def my_handler(scene):
global test
print('test:'+str(test))
location = bpy.data.objects['cube1'].location
print(location)
test = location
for i in range(len(bpy.app.handlers.frame_change_post)):
bpy.app.handlers.frame_change_post.pop()
bpy.app.handlers.frame_change_post.append(my_handler)
An example "print" result: test: test: