Skip to main content
Known Participant
April 3, 2025
Answered

copy/paste shape attributes issues

  • April 3, 2025
  • 6 replies
  • 955 views

Photoshop 26.5.0 release, mac os Sequoia 15.4

 

Since there is no way to create shortcuts for copy/paste shape attributes i created two actions with shortcuts to do that task and it worked perfectly until the latest update. Now both those action doesn't work showing «The command "shape clipboard operation" is not currently available». I tried to record those actions again but now copying shape attributes doesn't create an action entry. Even worse — now i can copy shape attributes but can't paste it, there is no such option anymore. 

Correct answer Stephen Marsh

@Serge Malevanny – Here are the scripted versions to install in the application's Presets/Scripts directory. Once installed and Photoshop restarted, you can then add custom keyboard shortcuts to the scripts.

 

Copy Shape Attributes.jsx

 

/* 
Copy shape attributes from the active layer to the clipboard
Stephen Marsh
v1.0 - 6th April 2025
https://community.adobe.com/t5/photoshop-ecosystem-bugs/copy-paste-shape-attributes-issues/idc-p/15253008
*/

#target photoshop;

try {
    s2t = stringIDToTypeID;
    (r = new ActionReference()).putProperty(s2t('property'), p = s2t('targetLayers'));
    r.putEnumerated(s2t("document"), s2t("ordinal"), s2t("targetEnum"));
    if (executeActionGet(r).getList(p).count) {
        if (app.activeDocument.activeLayer.kind === LayerKind.SOLIDFILL) {
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var desc257 = new ActionDescriptor();
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var idshapeCopyShapeAll = stringIDToTypeID("shapeCopyShapeAll");
            desc257.putEnumerated(idshapeClipboardOperation, idshapeClipboardOperation, idshapeCopyShapeAll);
            executeAction(idshapeClipboardOperation, desc257, DialogModes.NO);
        } else {
            alert("The active layer is not a Solid Fill layer!");
        }
    } else {
        // Selected layer check by jazz-y
        alert('No layer selected!');
    }
} catch (e) {
    alert('Error: ' + e.message);
}

 

 

Paste Shape Attributes.jsx

 

/* 
Paste shape attributes from the clipboard to the active layer
Stephen Marsh
v1.0 - 6th April 2025
https://community.adobe.com/t5/photoshop-ecosystem-bugs/copy-paste-shape-attributes-issues/idc-p/15253008
*/

#target photoshop;

try {
    s2t = stringIDToTypeID;
    (r = new ActionReference()).putProperty(s2t('property'), p = s2t('targetLayers'));
    r.putEnumerated(s2t("document"), s2t("ordinal"), s2t("targetEnum"));
    if (executeActionGet(r).getList(p).count) {
        if (app.activeDocument.activeLayer.kind === LayerKind.SOLIDFILL) {
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var desc266 = new ActionDescriptor();
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var idshapePasteShapeAll = stringIDToTypeID("shapePasteShapeAll");
            desc266.putEnumerated(idshapeClipboardOperation, idshapeClipboardOperation, idshapePasteShapeAll);
            executeAction(idshapeClipboardOperation, desc266, DialogModes.NO);
        } else {
            alert("The active layer is not a Solid Fill layer!");
        }
    } else {
        // Selected layer check by jazz-y
        alert('No layer selected!');
    }
} catch (e) {
    alert('Error: ' + e.message);
}

 

  1. Copy the code text to the clipboard
  2. Open a new blank file in a plain-text editor (not in a word processor)
  3. Paste the code in
  4. Save as a plain text format file – .txt
  5. Rename the saved file extension from .txt to .jsx
  6. Install the .jsx file to run (see below)
    https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html 

6 replies

Known Participant
June 18, 2025

@Stephen Marsh sorry it took me so long to try your method. Unfortunately it's not working for gradient filled objects (script returns «The active layer is not a Solid Fill layer!», and even if it were PS now doesn't support the shapeClipboardOperation function now (which is the root of this problem i guess). I just read in another topic about this problem and PS team confirmed that it's a bug and they're working to fix it. Hope it won't take long. 

Thanks for your support anyway!

Stephen Marsh
Community Expert
Community Expert
April 9, 2025
quote

It'd be very useful to be able to create keyboard shortcuts for copy/paste shape attributes not via actions but in "Keyboard shortcuts". 


By @Serge Malevanny

 

Did you try my scripts which once installed can have custom keyboard shortcuts applied, just like you requested?

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
April 5, 2025

@Serge Malevanny – Here are the scripted versions to install in the application's Presets/Scripts directory. Once installed and Photoshop restarted, you can then add custom keyboard shortcuts to the scripts.

 

Copy Shape Attributes.jsx

 

/* 
Copy shape attributes from the active layer to the clipboard
Stephen Marsh
v1.0 - 6th April 2025
https://community.adobe.com/t5/photoshop-ecosystem-bugs/copy-paste-shape-attributes-issues/idc-p/15253008
*/

#target photoshop;

try {
    s2t = stringIDToTypeID;
    (r = new ActionReference()).putProperty(s2t('property'), p = s2t('targetLayers'));
    r.putEnumerated(s2t("document"), s2t("ordinal"), s2t("targetEnum"));
    if (executeActionGet(r).getList(p).count) {
        if (app.activeDocument.activeLayer.kind === LayerKind.SOLIDFILL) {
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var desc257 = new ActionDescriptor();
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var idshapeCopyShapeAll = stringIDToTypeID("shapeCopyShapeAll");
            desc257.putEnumerated(idshapeClipboardOperation, idshapeClipboardOperation, idshapeCopyShapeAll);
            executeAction(idshapeClipboardOperation, desc257, DialogModes.NO);
        } else {
            alert("The active layer is not a Solid Fill layer!");
        }
    } else {
        // Selected layer check by jazz-y
        alert('No layer selected!');
    }
} catch (e) {
    alert('Error: ' + e.message);
}

 

 

Paste Shape Attributes.jsx

 

/* 
Paste shape attributes from the clipboard to the active layer
Stephen Marsh
v1.0 - 6th April 2025
https://community.adobe.com/t5/photoshop-ecosystem-bugs/copy-paste-shape-attributes-issues/idc-p/15253008
*/

#target photoshop;

try {
    s2t = stringIDToTypeID;
    (r = new ActionReference()).putProperty(s2t('property'), p = s2t('targetLayers'));
    r.putEnumerated(s2t("document"), s2t("ordinal"), s2t("targetEnum"));
    if (executeActionGet(r).getList(p).count) {
        if (app.activeDocument.activeLayer.kind === LayerKind.SOLIDFILL) {
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var desc266 = new ActionDescriptor();
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var idshapeClipboardOperation = stringIDToTypeID("shapeClipboardOperation");
            var idshapePasteShapeAll = stringIDToTypeID("shapePasteShapeAll");
            desc266.putEnumerated(idshapeClipboardOperation, idshapeClipboardOperation, idshapePasteShapeAll);
            executeAction(idshapeClipboardOperation, desc266, DialogModes.NO);
        } else {
            alert("The active layer is not a Solid Fill layer!");
        }
    } else {
        // Selected layer check by jazz-y
        alert('No layer selected!');
    }
} catch (e) {
    alert('Error: ' + e.message);
}

 

  1. Copy the code text to the clipboard
  2. Open a new blank file in a plain-text editor (not in a word processor)
  3. Paste the code in
  4. Save as a plain text format file – .txt
  5. Rename the saved file extension from .txt to .jsx
  6. Install the .jsx file to run (see below)
    https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html 
Stephen Marsh
Community Expert
Community Expert
April 5, 2025
quote

It'd be very useful to be able to create keyboard shortcuts for copy/paste shape attributes not via actions but in "Keyboard shortcuts".

 


By @Serge Malevanny


Installed scripts (not browsed) can run the action and have a custom keyboard shortcut applied.

 

Or the action commands can be scripted and installed without playing the action and have a custom keyboard shortcut applied.

BrettN
Community Manager
Community Manager
April 4, 2025

I tried this on my end and it's working for me. I'm able to create an action for both copying and pasting shape attributes. I'm also able to successfully play them back. The error you are seeing is expected if you do not have a shape layer selected when you playback either of these actions. At this point, I'd suggest resetting the application preferences to see if that returns you to a state where everything works as it does on my end: https://helpx.adobe.com/photoshop/using/preferences.html#reset-preferences

 

One thing I'll note is that there is a change in the more recent versions of Photoshop in which the Paste command does not appear until you have successfully copied attributes. This also means that if you have an action based on the Paste command, it will return an error if you have nothing in the clipboard to paste. 

Known Participant
April 3, 2025

It'd be very useful to be able to create keyboard shortcuts for copy/paste shape attributes not via actions but in "Keyboard shortcuts".