Collapse all layers

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Hoptoad
Posts: 624
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Collapse all layers

Post by Hoptoad »

Years ago someone (Stan) made a script that would collapse all the layers in all the groups in the Layer panel.

Does that remain the only way to do this? Or is there another way?

If that's the only way, does the script work in version 14?

Lately, I'm spending a lot of time collapsing layer groups, so I'm looking to speed things up.

Thanks.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Collapse all layers

Post by Daxel »

I was interested too. It's here. It works.
https://mohoscripts.com/script/sz_collapse_all_groups

Moho, if you are reading, this should be built in.
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Collapse all layers

Post by Greenlaw »

This could be handy! Thanks for mentioning the tool and sharing the link, guys.
Daxel wrote: Fri Nov 03, 2023 6:01 pm Moho, if you are reading, this should be built in.
Yes, I agree. This should be an R+click menu option for the Layers window or a modifier key.
Last edited by Greenlaw on Fri Nov 03, 2023 6:51 pm, edited 1 time in total.
User avatar
Hoptoad
Posts: 624
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: Collapse all layers

Post by Hoptoad »

Daxel wrote: Fri Nov 03, 2023 6:01 pm I was interested too. It's here. It works.
https://mohoscripts.com/script/sz_collapse_all_groups

Moho, if you are reading, this should be built in.
Thanks for the link.

EDIT

I just tried it and it works great. :D
User avatar
SimplSam
Posts: 1049
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Collapse all layers

Post by SimplSam »

This is built-in and has been for some time...

Alt-Click the down-triangle: ▼ - to close all

Alt-Click the right-triangle: ► - to open all
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Collapse all layers

Post by Greenlaw »

Oh, you're right! Thanks for the tip, SimplSam!

Ha ha! I think I knew this at one time, but I totally forgot. My brain is full and stuff is leaking out. :D
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Collapse all layers

Post by Daxel »

SimplSam wrote: Fri Nov 03, 2023 7:54 pm This is built-in and has been for some time...

Alt-Click the down-triangle: ▼ - to close all

Alt-Click the right-triangle: ► - to open all
Thanks, I didn't know that!

That's something, however I see a few problems with this implementation. Maybe because it has poor discoverability the feature has gotten a bit rusty:

1. It works for the specific group layer but not for the rest, meaning you have to do it on every group layer that has no parent. The script works on every group and for that reason alone I will have to keep using it. Adding a ctrl+click version to collapse/contract all groups would solve this.

2. It's slow for some reason. The script is noticeably faster.

3. I don't know how to reproduce it but two of the 15 times or so that I have used it Moho looked like it was going to crash and eventually Moho windows went to the background leaving other windows on top.

4. Discoverability is poor. I'm not surprised some of us have been years working with moho without knowing about this. If we had a button, an option, something, people would discover this is possible and mouse hovering over it could give the hint that this alt-click shortcut exists.
User avatar
Hoptoad
Posts: 624
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: Collapse all layers

Post by Hoptoad »

Daxel wrote: Fri Nov 03, 2023 8:36 pm. . .If we had a button, an option, something, people would discover this . . .
I noticed it was slower, too. I thought it didn't work at first. . .but then it worked.

The script does all the groups, which is nice. Generally when I want 1 bone rig collapsed, I want all the bone rigs collapsed, as I'll have several expanded.

But this ALT+click is pretty good.

Collapsing all groups with a button located on the layer panel would be sweet.
User avatar
EricTheFish
Posts: 85
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: Collapse all layers

Post by EricTheFish »

Hmm... I'm on Win10 and I only get to collapse the group arrow I click on. Alt-Click doesn't change anything, both on v13.5.5 and v14.

For anyone interested, I created a couple of Tool scripts that manipulate group layers. One just collapses all open groups, the other toggles open/closed all currently selected groups, including any nested groups.
Just copy the scripts and icons into your Custom Content Scripts/Tools folder.

Scripts can be downloaded here: https://www.dropbox.com/scl/fi/5m7nx6oa ... aqsdr&dl=0
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Collapse all layers

Post by Greenlaw »

EricTheFish wrote: Mon Nov 06, 2023 3:01 pm Hmm... I'm on Win10, and I only get to collapse the group arrow I click on. Alt-Click doesn't change anything, both on v13.5.5 and v14.
It works here, but I have to click directly over the arrow. If I'm a little off, it won't work.

Just a thought: If you're using a Stylus, trying different Wacom/Windows Ink pen settings might make a difference.

For example, Windows Ink should be enabled (it's necessary for pressure anyway.) I don't know if this option helps in this particular situation, but from what I recall, disabling Windows Ink affected my ability to R+Click in the Layers window, so maybe this is related. (Note: This was the case in an earlier version of Moho. I haven't checked for this in 14.)

Also, when you're using Moho 13.5.5 and earlier, Let Me Use My Pen As A Mouse probably should be disabled. Disabling this one improves pen behavior in older versions of Moho. (I'm told this option can be enabled or disabled for 14.0.)

Oh, and thanks for the script recommendation and sharing it. Will check this out! :D
Last edited by Greenlaw on Mon Nov 06, 2023 6:26 pm, edited 4 times in total.
User avatar
EricTheFish
Posts: 85
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: Collapse all layers

Post by EricTheFish »

@Greenlaw
Hi Dennis, I think I misundertood the ALT functionality. I can see it operating now on the child group layers within the parent group layer.
I was expecting it to work on all the open group layers. I think that's why I created my layer scripts back in v12.
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
Post Reply