I'm currently working on a project in 2.79b containing multiple shots that require several cameras (2+ keyframes for Location
with a Linear Extrapolation
applied to them) to be moving at the same speed.
At the moment, my workflow involves placing 2 keyframes for the active camera's Location
and essentially estimating how far apart they should be spaced in order for the speeds to match.
I am looking to create a Python Script that logs the speed of cameras in the scene (in Blender Units per second (U/s)?), on each frame, and outputs it to the console, for example. I'd also like it to output this value every time a keyframe on the current camera is changed, preferably in real-time.
Here's a (very rough!) example of what I'm hoping to achieve in terms of output...
What would be the most practical method of scripting this? Would it be best to find the distance travelled by the camera, for example, between the current and previous frame (e.g. through the difference in location), and then perform a "Speed = Distance/Time" calculation to obtain the speed, or is there a function in the Python API that provides access to this data automatically?
Any help would be much appreciated, thanks!