PDA

View Full Version : Problems with timeline.convertToKeyframes()


Cyd
08-31-2006, 10:44 PM
Im having a problem with timeline.convertToKeyframes()... Im using it to convert a tween from one keyframe to another keyframe, into a baked set of keyframes.

Now, it works perfectly when its just run on its own, or in a small file. But I have it working alongside a rather lengthy masking script that I am using for a production. Under the same circumstances, and with the exact same code in its same circumstances it does two entirely different things.

When its run alone, it converts the tween to keyframes -- thus baking the frames-- and all the resulting frames have the same motion as they had when tweened.

When its run in this lengthy masking script, it converts the frames to keyframes, but it treats it as if there wasnt even a tween there to begin with. In other words, all the resulting frames are the same as the first frame in the tween -- and then it pops to the final frame.

This is absolutely ridiculous, and there should be no reason whatsoever for the code to be reacting differently -- when its brought up in the same way in the same file. Ive even made the code into a script, and the lengthy script runs the smaller script as it is processing, but this still results in the keyframes not maintaining the proper motion.

Any help on this would be much appreciated. Seperating the scripts and having them run at different times is not a good solution in this case.

-Chris

krayzeebean
09-01-2006, 10:12 PM
A couple people here have run into this, it happens with both convertToKeyframes() and insertKeyframes(). The code also runs differently if you double-click the script file or via MMExecute vs. running it from the commands menu. In fact I think your script would work correctly if you run it by double-clicking it. I don't think there's any real solution other than trying to come up with some clever way of working around it.

Atom
09-29-2006, 06:56 PM
Instead of replacing them in the same layer, create a new keyframe in a new layer, then delete the layer with the tweens?