Skip to main content
aimee21m55
Participant
September 22, 2018
Question

Move layers to group

  • September 22, 2018
  • 1 reply
  • 390 views

I am trying to move layers into one group so I can center align the group. I don't want the background layer so it needs to be locked or invisible before moving layers. I can't seem to find the script I am looking for. Does anyone have a script like this or can point me to one?

This topic has been closed for replies.

1 reply

Kukurykus
Legend
September 22, 2018

Something similar for start: Layer To Be Centered - PS-SCRIPTS.COM

aimee21m55
Participant
September 22, 2018

I believe that centers the layers in a group(layer set). I want to move all the layers into a group and center the group.

Kukurykus
Legend
September 22, 2018

It seems you want more than only example So here is initial part to put selected layers into a group:

sTT = stringIDToTypeID, dsc = new ActionDescriptor()

ref1 = new ActionReference(), ref2 = new ActionReference()

ref1.putClass(sTT('layerSection')); dsc.putReference(sTT('null'), ref1);

ref2.putEnumerated(sTT('layer'), sTT('ordinal'), sTT('targetEnum'))

dsc.putReference(sTT('from'), ref2), executeAction(sTT('make'), dsc)