*NEW* Find and delete negative keyframes

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Post Reply
User avatar
synthsin75
Posts: 7156
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

*NEW* Find and delete negative keyframes

Post by synthsin75 » Wed Feb 20, 2019 2:09 am

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.
Last edited by synthsin75 on Sat Feb 23, 2019 7:35 pm, edited 1 time in total.
User avatar
Lukas
Posts: 789
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: *NEW* Find and delete negative keyframes

Post by Lukas » Wed Feb 20, 2019 9:22 am

This could be useful for troubleshooting troublesome files, thanks for sharing. :)
User avatar
Penny
Posts: 38
Joined: Sun Dec 02, 2018 3:56 pm
Location: Italy

Re: *NEW* Find and delete negative keyframes

Post by Penny » Wed Feb 20, 2019 4:19 pm

Thanks Wes! This is very helpful!
Even with the head in the clouds You can touch the ground

https://www.facebook.com/santiago.penny
https://www.behance.net/pennysantiago
Slyanim
Posts: 23
Joined: Wed Jan 25, 2017 11:42 pm

Re: *NEW* Find and delete negative keyframes

Post by Slyanim » Fri Aug 02, 2019 10:06 pm

Life saver! Thank you Wes!
catwrestler
Posts: 2
Joined: Fri Aug 16, 2019 12:52 am

Re: *NEW* Find and delete negative keyframes

Post by catwrestler » 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?
User avatar
synthsin75
Posts: 7156
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *NEW* Find and delete negative keyframes

Post by synthsin75 » Sat Sep 28, 2019 6:50 pm

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.
User avatar
Greenlaw
Posts: 4466
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *NEW* Find and delete negative keyframes

Post by Greenlaw » Sun Sep 29, 2019 3:43 pm

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.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
Post Reply