Page 1 of 1

*NEW* Find and delete negative keyframes

Posted: Wed Feb 20, 2019 2:09 am
by synthsin75
https://sites.google.com/site/synthsin/ ... ects=0&d=1

This will find and show a list of all the keyframes in the negative timeline, and ask if you want to delete them. This will solve a lot of problems with layers freaking out and other odd behaviors.

If the list is too long and the buttons are off screen, you can just hit "y" to delete them or "n" to cancel.

It avoids what seem to be legit keyframes on the negative timeline, but until there are more test cases, use it on a copy of your file so you can verify everything is working fine.

Re: *NEW* Find and delete negative keyframes

Posted: Wed Feb 20, 2019 9:22 am
by Lukas
This could be useful for troubleshooting troublesome files, thanks for sharing. :)

Re: *NEW* Find and delete negative keyframes

Posted: Wed Feb 20, 2019 4:19 pm
by Penny
Thanks Wes! This is very helpful!

Re: *NEW* Find and delete negative keyframes

Posted: Fri Aug 02, 2019 10:06 pm
by Slyanim
Life saver! Thank you Wes!

Re: *NEW* Find and delete negative keyframes

Posted: Sat Sep 28, 2019 3:39 am
by catwrestler
Negative keys... interesting. I'm wondering what are major causes and how do I know I have them?

Re: *NEW* Find and delete negative keyframes

Posted: Sat Sep 28, 2019 6:50 pm
by synthsin75
If you have any significant performance issues or weird behavior, you can run this script to see if keyframes in the negative timeline may be a cause.

Re: *NEW* Find and delete negative keyframes

Posted: Sun Sep 29, 2019 3:43 pm
by Greenlaw
catwrestler wrote:
Sat Sep 28, 2019 3:39 am
Negative keys... interesting. I'm wondering what are major causes and how do I know I have them?
Coincidentally, a user in another forum asked this same question yesterday, so I'm re-posting an edited version of my reply here:

You'll know when this happens: Moho will suddenly crawl like it's processing the entire internet. :)

This happens when Moho places an unintended keyframe thousands of frames before frame zero, which apparently causes the computer to evaluate every frame in-between. It takes only one of these unintended keyframes to seriously impact Moho's performance. If there's more than one, Moho may become unusable. By 'serious impact', I mean basic actions like trying to animate a bone or copy and paste a keyframe will make Moho take a long pause, and getting any work done will take forever.

To fix this previously, you had to copy the visible keyframes for each channel, delete the entire channel, and then paste the intended keyframes back into the channel. Then you had to repeat this for every channel until you were sure you got rid of any and all of the unintended keyframes. Needless to say, this could be a huge time-waster. Or, if you know what to look for, you could search for the bad keyframes in the project file using a text editor and delete the keys that way.

Wes' script simplifies the process to a single command.

FYI, this issue happened to me Friday at work: A Moho rigged character I was animating suddenly became sluggish for no apparent reason. Even copying and pasting keys took forever. Prior to this slow-down, the rig was very responsive and quick to animate, so I was pretty sure I had at least one negative keyframe in this project.

When I ran Wes' script, it confirmed that this was indeed the case and it fixed the problem instantly.

If the script says there are no negative keyframes in the project, then at least you know to look elsewhere for the problem.

As mentioned above, you should save a backup copy of your project before running this script, just in case it does more harm than help.

Nobody seems to know why it happens but fortunately the problem occurs rarely. Also, it may occur in Moho 12.5 and earlier but I'm not yet sure that this happens in Moho 13.