Is there a "collapse all groups (layersets)" shortcut?

Explorer ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

Or a script if someone has that i can bind to a button.

TOPICS
Actions and scripting

Views

1.3K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 27, 2020 Apr 27, 2020
// Collapse all layer groups/sets
app.runMenuItem(stringIDToTypeID('collapseAllGroupsEvent'));

Likes

Translate

Translate
Community Expert ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

Have you tried cmd-clicking the »open triengle«-icon that indicates this? 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

>> shortcut <<

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

I apologize, I had read sloppily. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

// Collapse all layer groups/sets
app.runMenuItem(stringIDToTypeID('collapseAllGroupsEvent'));

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

For completeness, I wanted to add the following code, however it no longer appears to work?

 

 

// Expand all layer sets  
// https://forums.adobe.com/message/5764024#5764024  
function openAllLayerSets(parent) {
    for (var setIndex = 0; setIndex < parent.layerSets.length; setIndex++) {
        app.activeDocument.activeLayer = parent.layerSets[setIndex].layers[0];
        openAllLayerSets(parent.layerSets[setIndex]);
    }
}
openAllLayerSets(app.activeDocument);

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

It's supposed to recursively expand set by setting it as active layer?

I just recently started looking into PS scripting, so i don't know api at all.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

Where did you get

collapseAllGroupsEvent

from? Is there a doc with all those events?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

Script listener output from action panel insert menu item command or from simply using the menu command.

 

https://blogs.adobe.com/crawlspace/2006/05/installing_and_1.html

ADOBE PHOTOSHOP SCRIPTING

Scripting Listener not working in Photoshop 2020 for mac

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

The Group-opening code works fine for me (on 21.1.2). 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

>however it no longer appears to work?

shouldn't have trusted you!

Works indeed, but slow.

Wondering if there is an event for that.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

GIGO, I quickly tested with multiple empty sets, I'm sure it will work when I actually put something inside!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 09, 2022 Aug 09, 2022

Copy link to clipboard

Copied

LATEST

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines