Page 3 of 3

Re: Clean keyframes script?

Posted: Tue May 22, 2018 10:22 am
by Lukas
That was fast! Great work, so far it all works perfectly. Thanks a lot! :mrgreen:
synthsin75 wrote:Lukas, it won't work exactly like you colored the keys in your example file. It always leaves the last keyframe in a channel, but if I got enough feedback that that was undesired, I could change that.
I can imagine that's actually the best way to do it, since the last keyframes might be the first pose of a new pose-to-pose segment. So leaving them is the best way to handle it indeed!
synthsin75 wrote:And if you use that file to test separate dimensions, the z-axis is unchanged, so it will only leave the last key on that channel.
Perfect
synthsin75 wrote:Still doesn't handle camera channels.
No sweat :) Camera keys are usually quite easy to keep clean manually, compared animated objects.

Any chance of this tool also working for points someday? (I can imagine that's an entirely different beast and much harder to do)
EDIT: I just checked and realized it also works for points already, AWESOME!

Re: Clean keyframes script?

Posted: Tue May 22, 2018 6:54 pm
by synthsin75
Glad to hear it's doing everything you need, Lukas.

Re: Clean keyframes script?

Posted: Tue May 29, 2018 9:21 am
by Lukas
Hmmm, actually I've been coming across this one situation where it's actually wishful to delete the last keyframe also a few times already.

When the last keyframe is the only keyframe in a channel and it has the same value as frame 0, it would be better if it would be deleted.

For example:

I've been animating a few shots, I press Ctrl+F to freeze the poses all the time. And adjust the poses along the way. Very often I only use translate and rotate bone and don't use scale bone at all in a shot.

So when I'm done with the rough animation, everything pose to pose, I'd like to press 'clean keys' and continue on the details with a nice clean timeline. The problem is, even though I haven't touched scale bone on any of the bones. On the last pose, the scale keys will always remain there. (And so will the channels when they are set to 'auto' in the channel visibility window). You'd expect the scale channels to dissapear if you haven't animated them at all.

So in those cases, when the last key is the only key and it matches frame 0, I think it would be better of cleaned/deleted. :) I hope that makes sense.

Re: Clean keyframes script?

Posted: Fri Jun 01, 2018 1:39 pm
by Lukas
Okay, after using your script a bit more, I'm certain it would definitely be more useful if the last key would also be deleted if it is 'obsolete'. At all times :)

Re: Clean keyframes script?

Posted: Fri Jun 01, 2018 10:11 pm
by synthsin75
Lukas wrote:Okay, after using your script a bit more, I'm certain it would definitely be more useful if the last key would also be deleted if it is 'obsolete'. At all times :)
Yeah, I agree and had been looking into it since your last post. How the script is structured, that's not a quick or easy change. I'll continue to look into it as I have time.

Re: Clean keyframes script?

Posted: Sun Jun 03, 2018 7:40 am
by synthsin75
Okay, this script now comes in two flavors:
Regular: https://drive.google.com/uc?export=down ... KF3PStyrT0
This version retains the last keyframe, unless it only finds one key that matches frame zero. So if the channel is unanimated, running it once deletes all but the last key (in case you need it for a hold) and running it again deletes these lone keys (except of split dimension channels).
Severe: https://drive.google.com/uc?export=down ... 0V2wV_X1U-
This version always deletes the last keyframe if it is obsolete (even for split dimension channels).

Re: Clean keyframes script?

Posted: Tue Jun 05, 2018 8:48 am
by Lukas
Cool, I'll try using them both. This is extremely useful stuff Syn, great work and thanks for sharing!

Edit: I encountered a situation where keys aren't being deleted when they actually should (I think?). See this file. Both the 'Pupil1' and 'Pupil2' bones still have a keyframe at frame 82 after running the severe script. Unless I'm missing something, you'd expect them to get deleted right?

Re: Clean keyframes script?

Posted: Wed Jun 06, 2018 5:34 am
by synthsin75
Updated both. I forgot to handle last step keys.

Re: Clean keyframes script?

Posted: Wed Jun 06, 2018 6:21 am
by Lukas
Much appreciated! Tested and works :)

Re: Clean keyframes script?

Posted: Wed Jun 06, 2018 5:09 pm
by Víctor Paredes
A.Evseeva wrote:Victor, please check the latest version of my keytools script, it has the CLEANUP option, making what, I suppose, You wanted. Unfortunately it does not check bezier handles, but in some cases it can help.
Hi, A.Eseeva
I have been using your script and for both cleaning the animation and also copying and pasting poses in the characters. It's fantastic. Is there any specific thread about your script? I can't find any.
Thanks!

Re: Clean keyframes script?

Posted: Thu Jun 07, 2018 4:47 pm
by A.Evseeva
Víctor Paredes wrote: Is there any specific thread about your script? I can't find any.
It was started here:
http://lostmarble.com/forum/viewtopic.php?f=12&t=31523

Re: Clean keyframes script?

Posted: Fri Jun 22, 2018 8:48 am
by Víctor Paredes
A.Evseeva wrote:
Víctor Paredes wrote: Is there any specific thread about your script? I can't find any.
It was started here:
http://lostmarble.com/forum/viewtopic.php?f=12&t=31523
Thanks!

Re: Clean keyframes script?

Posted: Tue Jul 24, 2018 10:03 am
by Lukas
Bumped into another exception :shock:

The first 'switch' keyframe remains on the timeline after running the clean keyframes script. I tried A.Evseeva's version, and it skips it there too.

(Edit: Wait...there might just be something wrong with my keys instead (some script created the keys))

(Edit 2: Yep, false alarm. The other script created faulty keys. Ignore this post.)