• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

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

2.7K

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'));

Votes

Translate

Translate
Adobe
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? 

Votes

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 <<

Votes

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. 

Votes

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'));

Votes

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);

 

Votes

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.

 

Votes

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?

Votes

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

 

Votes

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). 

Votes

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.

 

Votes

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!

Votes

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

Votes

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