I’m having trouble moving a Photoshop layer set inside another layer set. I have no problem moving an art layer into a layer set:
tell application "Adobe Photoshop CC 2014"
tell current document
set parentLayerSet to make new layer set at end with properties {name:"Parent"}
set childLayer to make new art layer at end with properties {name:"Child"}
move childLayer to end of parentLayerSet
end tell
end tell
but if I try to move a layer set into another I get an error 50:
tell application "Adobe Photoshop CC 2014"
tell current document
set parentLayerSet to make new layer set at end with properties {name:"Parent"}
set childLayerSet to make new layer set at end with properties {name:"Child"}
move childLayerSet to end of parentLayerSet
end tell
end tell
The problem that I have is that the Child layer set has already been duplicated from another document. I have just tried making a new Child layer set in the Parent as you suggested and then moving every layer inside the original Child set to the new nested Child set which would work if the duplicated Child set didn’t contain layer sets itself!!!
tell application "Adobe Photoshop CC 2014"
set psFile to current document
set parentLayerSet to layer set "Parent" of psFile
set childLayer to layer set "Child" of psFile
set childTextLayerSet to make new layer set at myLayerSet with properties {name:"Text"}
move every layer of textLayerSet to end of childTextLayerSet
end tell