Page 1 of 1

EDIT New script! Hide layers with no animation

Posted: Tue Aug 08, 2017 6:40 pm
by Víctor Paredes
Hi, I'm working in a character which has lots of point animation in many of its layers, so I'm constantly navigating between the layers to edit them. The issue is having the layers with no animation also visible in the Layers window makes that navigation much harder.

I love the idea of using filters in the layers palette (and use them a lot), but I'm missing a "show animated layers only" filter. So I thought that maybe it would be possible to create a script that automatically put an "animated" tag into all the layers with any key in the mainline, so then I can quickly filter the layers using that tag.
Do you think that is possible?

Thank you very much.

Re: Script request: Tag all layers with keyframes in Mainlin

Posted: Wed Aug 09, 2017 12:27 am
by synthsin75
Here you go, Victor.
https://drive.google.com/uc?export=down ... YvpSxvcjsy

It's a menu script. It will add the "animated" tag to any layer with animation and remove the tag if animation has been deleted.

Re: Script request: Tag all layers with keyframes in Mainlin

Posted: Wed Aug 09, 2017 12:44 am
by Víctor Paredes
Thank you very much, Wes! You are very generous.
This is fantastic and will save me a lot of time in this and future projects. And, of course, I recommend everyone to use it, it really simplifies the layer navigation and correction process.

To install it:
- Go to File -> Open Custom Content Folder
- In the folder, navigate to Moho Pro\scripts\menu\
- Drag the syn_tag_animated.lua into any of that folders, or create a new one (in my case, I put it in a new folder called "Animation")
- Go back to Moho and press Ctrl+Alt+Shift+L (or Cmd+Alt+Shift+L if you are using a Mac) to refresh the scripts

To use it:
- Simply go to the go to the menu Scripts/Animation and select the script. The script will add the "animated" tag to every layer which has animation
- To show only the layers with animation, go to the Layers window and select "Tags Contain..." in the Filter section and write "animated"

Now, if you want to see the whole project keyframes in the Timeline, simply select all that filtered layers.
Maybe this sounds small, but at least for me is a huge help :)

Thanks again!

Re: Script request: Tag all layers with keyframes in Mainlin

Posted: Wed Aug 09, 2017 12:49 am
by Víctor Paredes
Oh, Wes, I'm sorry to bother, but noticed the script also adds the tag to the containers (groups, bones, switches, etc), even if they don't have keyframes themselves. Is there any way to avoid that behavior?

Thanks and sorry again.

Re: Script request: Tag all layers with keyframes in Mainlin

Posted: Wed Aug 09, 2017 2:28 am
by synthsin75
I've updated the above link. It should only tag keyframed layers now.

Re: Script request: Tag all layers with keyframes in Mainlin

Posted: Wed Aug 09, 2017 6:13 am
by Víctor Paredes
synthsin75 wrote:I've updated the above link. It should only tag keyframed layers now.
Thank you very much, Wes. It is working perfectly!

Re: EDIT New script! Hide layers with no animation

Posted: Thu Aug 10, 2017 12:12 am
by synthsin75
Glad I could help, Victor. You're always real good at describing what you need a script to do.

Re: Script request: Tag all layers with keyframes in Mainlin

Posted: Mon Aug 14, 2017 10:13 am
by GaryC
synthsin75 wrote:I've updated the above link. It should only tag keyframed layers now.
Ah, thanks Wes! I has just made a similar script last week but to get around the problem of tagging non animated layers I had a loop running that checks all the animation channels of a layer. Just using this ClearLayerKeyCount function seems a lot faster, do you know how it works/what exactly it does? I'm guessing it clears the keys and forces a recalculation of the key count, but do you know if there's any side effects that I should be aware of?

Re: Script request: Tag all layers with keyframes in Mainlin

Posted: Tue Aug 15, 2017 12:02 am
by synthsin75
GaryC wrote:
synthsin75 wrote:I've updated the above link. It should only tag keyframed layers now.
Ah, thanks Wes! I has just made a similar script last week but to get around the problem of tagging non animated layers I had a loop running that checks all the animation channels of a layer. Just using this ClearLayerKeyCount function seems a lot faster, do you know how it works/what exactly it does? I'm guessing it clears the keys and forces a recalculation of the key count, but do you know if there's any side effects that I should be aware of?
I wasn't sure what all it did at first, but from my tests, the key count seems to remain the last highest count (even when some are deleted) until cleared...and it recounts them. I didn't find any side effects.

Re: Script request: Tag all layers with keyframes in Mainlin

Posted: Tue Aug 15, 2017 4:10 pm
by GaryC
synthsin75 wrote:I wasn't sure what all it did at first, but from my tests, the key count seems to remain the last highest count (even when some are deleted) until cleared...and it recounts them. I didn't find any side effects.
Sounds good, I implemented it now and seems to be working great. Thanks!