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?
2
Answers
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
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: