8

I created a extendscript that automatically creates layersets for asset textures for a game.

After creating a layerset, the set is expanded by default. I want the layerset to be collapsed as shown in the picture below. I leave only the Diffuse layer to be expanded. The rest is closed. I've searched the reference by Adobe on how to do this but couldn't find anything. How do i collapse a layerset?

The layersets as it should be: only Diffuse should be expanded

3
  • Try the graphic design site ( graphicdesign.stackexchange.com ). Commented Sep 12, 2015 at 14:40
  • 1
    I'm doing this through scripting. :) Commented Sep 12, 2015 at 14:48
  • I have never worked with extend script but I would think there is some event you can trigger in order to collapse/expand the layer set. I think Adobe support might be best to contact. Commented Jun 16, 2016 at 19:58

2 Answers 2

3

As Mr Mystery Guest said, unfortunately you can't collapse a particular group, but you can collapse all the groups.

The link from the accepted answer is dead, so I will post here a solution:

var idcollapseAllGroupsEvent = stringIDToTypeID("collapseAllGroupsEvent");
var desc = new ActionDescriptor();
executeAction(idcollapseAllGroupsEvent, desc, DialogModes.NO);
Sign up to request clarification or add additional context in comments.

Comments

1

There is no way to do this via scripting (I've looked into this before). There simply is no collapse (or equivalent) layerSets property to set!

However, what you can do is press CTRL (or Command on Mac) and click on the little arrow next to the group (in the layers window) - which will collapse all the groups for you.

There is a work around solution : but you'll have to search for it

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.