Copy link to clipboard
Copied
.
Copy link to clipboard
Copied
Is this related to your similar question which was discussed a few days ago?
Copy link to clipboard
Copied
Copy source layer to clipboard, then select the destination layer/s and run this script (does not work with non-pixel layers):
/*
Paste Clipboard to Multiple Selected Layers.jsx
Stephen Marsh, v1.0 - 16th January 2022
https://community.adobe.com/t5/photoshop-ecosystem-discussions/paste-on-multiple-layers-at-once/td-p/12673987
NOTES:
Copy source layer to clipboard, then select the destination layer/s and run this script (does not work with non-pixel layers)
*/
#target photoshop
/***** Process Selected Layers from Jazz-y *****/
var s2t = stringIDToTypeID;
(r = new ActionReference).putProperty(s2t('property'), p = s2t('targetLayersIDs'));
r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
var lrs = executeActionGet(r).getList(p),
sel = new ActionReference();
for (var i = 0; i < lrs.count; i++) {
sel.putIdentifier(s2t('layer'), p = lrs.getReference(i).getIdentifier(s2t('layerID')));
(r = new ActionReference).putIdentifier(s2t('layer'), p);
(d = new ActionDescriptor()).putReference(s2t("target"), r);
executeAction(s2t('select'), d, DialogModes.NO);
/***** Process Selected Layers from Jazz-y *****/
if (app.activeDocument.activeLayer.kind == LayerKind.NORMAL) {
// Select All
app.activeDocument.selection.selectAll();
// Paste In Place
var idpaste = stringIDToTypeID("paste");
var desc1571 = new ActionDescriptor();
var idinPlace = stringIDToTypeID("inPlace");
desc1571.putBoolean(idinPlace, true);
var idantiAlias = stringIDToTypeID("antiAlias");
var idantiAliasType = stringIDToTypeID("antiAliasType");
var idantiAliasNone = stringIDToTypeID("antiAliasNone");
desc1571.putEnumerated(idantiAlias, idantiAliasType, idantiAliasNone);
var idas = stringIDToTypeID("as");
var idpixel = stringIDToTypeID("pixel");
desc1571.putClass(idas, idpixel);
executeAction(idpaste, desc1571, DialogModes.NO);
// Merge Down
var idmergeLayersNew = stringIDToTypeID("mergeLayersNew");
var desc1573 = new ActionDescriptor();
executeAction(idmergeLayersNew, desc1573, DialogModes.NO);
// Deselect
app.activeDocument.selection.deselect();
} else {
alert('The selected layer is not a "normal" pixel layer')
}
}
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
.
Copy link to clipboard
Copied
@?... wrote:
Okay thank you! Could you possibly give me a visual as to where I'm taking that though? I'm just not quite sure where I'm supposed to paste. You also say "select the destination layers," could you elaborate on that too please? I honestly can't tell if I know what that's referring to.
You don't paste, the script does that for you to the multiple selected layers.
Step 1: Select/target/activate the layer and copy to the clipboard:
Here Layer 2 is the source, Layer 0 & Layer 1 will be the destination/target layers
Step 2: Select/target/activate Layer 0 & Layer 1
Layer 0 & Layer 1 selected/targeted/activated
Step 3: Run the script
Layer 0 & Layer 1 now have the copied content from Layer 2
Copy link to clipboard
Copied
Is it possible to make this script work for vector layers?
Copy link to clipboard
Copied
@jeffreynuez wrote:
Is it possible to make this script work for vector layers?
Possibly, however I'm guessing that it is not as simple as for raster data.
Can you post a cropped screenshot of the layers panel?
Is the source layer kind a shape layer or vector smart object?
What is the destination layer kind and is it blank?
Copy link to clipboard
Copied
I was looking to copy one of these shapes and paste it in place to the rest of them.
Copy link to clipboard
Copied
I have had a play and have come to the conclusion that live shapes and vectors from live shapes are complicated to deal with as you request.
Deleting and dupliating would be somewhat easier than copy/paste.
Perhaps another more advanced scripter would like to give it a go.
Copy link to clipboard
Copied
I have had a play and have come to the conclusion that live shapes and vectors from live shapes are complicated to deal with as you request.
Would duplicating the one Shape Layer, moving it in front of one of the receiving Shape Layers, selecting both Layers and »Merge Shapes« (and iterating through all the receiving Shape Layers) work?
Copy link to clipboard
Copied
@jeffreynuez wrote:
Is it possible to make this script work for vector layers?
What is the point here?
Could you please post meaningful screenshot (the whole canvas with all pertinent Panels) to illustrate what the starting point is and what the result should be?
Copy link to clipboard
Copied
So I'm currently working on extremely large PSD files that range from 500 to 1,000 assets.
 
Each asset has a bounding box shape and a vector mask within them that should not be moved as the artist create their art in the art layers. All of the shapes and vector masks should be in the same size and position.
The current issue is that the artists still move and resize them. When this happens I reshape the first one and then I isolate all assets by name and then copy and paste in the same position to each shape. I've tried looking into a couple of methods to make this faster but no luck just yet. I know coping and pasting the vector mask isn't possible but I'm hoping that shapes can be done in mass through a script.