I’m writing a short python script to make an earthquake. It will put some random shaking on the X, Y or Z axis.
I’ve gotten it so it shakes on any axis over a chosen span of frames. But to make this more useful, I want it to be able to find out what the length of the timeline is so the user does not have to set it manually. I looked through the API library and didn’t find the answer.
Currently, the program just creates a keyframe on each frame within the assigned range. But I’d like to improve it so it adds the shaking to the current value at a given time on a given curve. Knowing the value at a given keyframe is easy, but I haven’t found out how to get the value of the curve at a given time. Does anyone know how to do this?