So I have an eye dart animation that is 15 seconds long. I have it called into all of my dialogue animations through the text files. Most of the audio clips are only 3 to 5 seconds long, with a few exceptions. So what ends up happening is it will go through and play the audio clip with the animation for the 3-5 seconds, then continue to play the eye dart animation for the remaining 10 seconds. So my question is, is there a way to cut down the event time to the audio time without just speeding up the eye dart animation with the duration scale command? If there's a good way in the text file to just say "stop playing EyeDartAnim" that would be ideal.
Thanks!
Once you add an event to an animation, you have increased the animation length, and the event will always play all the way through.
So you have to solve this problem before adding the event to the animation, probably by using python to figure out the animation length, then inserting an appropriately-lengthed event. So you may need multiple copies of your EyeDartAnim with different lengths.
You can get the animation length like so:
from FxAnimation import *
myAnim = Animation("MY ANIM GROUP NAME", "MY ANIM NAME")
endTime = myAnim.endTime
You can do this inside postanalysis python signal to do this on all animations after you have analyzed audio:
http://facefx.com/documentation/2015.1/W91
If the EyeDart animation is simple enough, you may be able to solve this problem using "recursive" events, which will continue to replicate until they fill the current animation. This is how we generate blinks in the Default analysis actor. But you need to be careful with recursive events because it is easy to use them incorrectly and cause serious problems with your animation.