# Photoshop Action to expand or collapse a layer group?



## Deleted member 39308 (Jan 8, 2017)

I have hunted high and low with my fav search engine and failed to find a solution to a Photoshop problem.

I am recording an action, it creates a layer group with several layers in it. When playing back the action the layer group is collapsed.

My action then steps backwards two layers, the trouble is I need to step back two layers in the collapsed group, what happens when I replay is the action skips over the collapsed group and selects layers below.

Is there a way in a Photoshop action to collapse and expand a layer group?

Clicking the expand triangle whilst recording an action has no effect, the clicking the > icon is not recorded.

Hoping somebody knows how to expand a group in a Photoshop action.


----------



## Johan Elzenga (Jan 8, 2017)

In principle you can solve this by choosing 'Add Menu Item' from the action menu, which gives you the option to manually add a menu that isn't recorded. Strangely enough however, there is a 'Collapse All Groups' menu in the Layers panel, but I don't see an 'Expand All Groups' menu...


----------



## Victoria Bampton (Jan 8, 2017)

You might want to add your vote to this feature request Photoshop: Record expand/collapse groups in actions | Photoshop Family Customer Community


----------



## Deleted member 39308 (Jan 8, 2017)

Thanks Johan and Victoria for the input. I will add a vote to the feature request. Does seem a bit odd that you cannot do this on a per group basis and expand all groups is missing in Photoshop.

I found if you select layers and create group from selected layers in an action the group is always collapsed and you cannot then use alt [ or alt ] to move up and down the layers in the group, it jumps to layers outside the group. (I am after creating a group with several different black and white conversions and turning all but the first one off, easy if I could go down the layer stack with alt [ )

If you create a group first and then add adjustment layers the layers are added to the group and not collapsed. Problem is now if you use short cut alt . to go to the top layer hoping to add an adjustment layer above the group, it doesn't it gets added back underneath into the group.

I found a way round it was to use the second method above, use the option key to add a new blank layer above the group, add my adjustment layer, then alt [ to go down a layer and delete the blank layer. Bit of a faff but it worked for my use.


----------

