Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Please fix how RELINK TO FILE and REPLACE CONTENT work

Advocate ,
Sep 06, 2024 Sep 06, 2024

RELINK TO FILE updates all instances of that asset. Good. But.... I want to swap out one layer with that asset with a french version. REPLACE CONTENT should do that... as it works, both of these right clicks do the same thing. PITA when working of a plethora of banners in english and then need to swap out layers (SOs) for french links IN THE SAME PSD FILE. Please get this going asap, or add a new right click that offers this. 

TOPICS
Windows
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Sep 06, 2024 Sep 06, 2024

@Todd_Morgan â€“ What you are complaining about is true:

 

https://helpx.adobe.com/au/photoshop/using/create-smart-objects.html#replace-smart-object-content

You can replace the image data in one Smart Object or multiple linked instances.


 

One needs to use the "New Smart Object Via Copy" command to isolate one particular embedded smart object so that it isn't synchronised.

 

There isn't such a native feature for linked smart objects, as they are linked, all links get replaced. I wrote a script to automate the creation of a "New Linked Smart Object via Copy", however it automatically saves a new linked file to break the path to the original linked file:

 

 
Another simpler option to automate this is to create a 5-step action to run on the linked smart object layer, where you can simply select the existing new file to replace:
 
1) Convert to Smart Object
2) Edit Contents
3) Select Relink to File menu item
4) Close - Saving: yes
5) Convert Smart Object to Layers
 
atn.png 
 
Here is a scripted version offering some extra features which are not available for actions:
 
/*
Relink to New Linked Smart Object via Copy.jsx
v1.0 - 9th September 2024, Stephen Marsh
NOTE: The script will relink to an existing file
https://community.adobe.com/t5/photoshop-ecosystem-discussions/please-fix-how-relink-to-file-and-replace-content-work/td-p/14846535
Related to:
https://community.adobe.com/t5/photoshop-ecosystem-discussions/why-is-new-smart-object-via-copy-greyed-out-for-linked-smart-objects/td-p/14371680
*/

#target photoshop

try {

    // Smart object action manager properties
    var ref = new ActionReference();
    ref.putProperty(charIDToTypeID("Prpr"), stringIDToTypeID("smartObject"));
    ref.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
    var so = executeActionGet(ref).getObjectValue(stringIDToTypeID("smartObject"));

    // Conditional check for the active layer being a linked smart object
    if (so.getBoolean(stringIDToTypeID("linked"))) {
        // Single history stage undo
        activeDocument.suspendHistory("Relink to New Linked Smart Object via Copy.jsx", "main()");
    }

} catch (err) {
    alert("Error!" + "\r" + err + "\r" + 'Line: ' + err.line);
}

function main() {

    try {

        // Convert the active linked smart object layer to an embedded smart object
        executeAction(stringIDToTypeID("newPlacedLayer"), undefined, DialogModes.NO);

        // Edit the smart object contents
        executeAction(stringIDToTypeID("placedLayerEditContents"), new ActionDescriptor(), DialogModes.NO);

        // Relink to file
        var idselect = stringIDToTypeID("select");
        var desc350 = new ActionDescriptor();
        var idnull = stringIDToTypeID("null");
        var ref59 = new ActionReference();
        var idmenuItemClass = stringIDToTypeID("menuItemClass");
        var idmenuItemType = stringIDToTypeID("menuItemType");
        var idplacedLayerRelinkToFile = stringIDToTypeID("placedLayerRelinkToFile");
        ref59.putEnumerated(idmenuItemClass, idmenuItemType, idplacedLayerRelinkToFile);
        desc350.putReference(idnull, ref59);
        executeAction(idselect, desc350, DialogModes.ALL);

        // Get the layer name
        var layerName = app.activeDocument.activeLayer.name;

        // Close and save
        app.activeDocument.close(SaveOptions.SAVECHANGES);

        // Convert the embedded smart object back to a linked smart object
        executeAction(stringIDToTypeID("placedLayerConvertToLayers"), undefined, DialogModes.NO);

        // Set the layer name
        app.activeDocument.activeLayer.name = layerName;

    } catch (err) {
        alert("Error!" + "\r" + err + "\r" + 'Line: ' + err.line);
    }

}
 
P.S. You can add a feature request by marking a new topic as an "idea" rather than as a "discussion".
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 13, 2024 Sep 13, 2024

That is not true, all links do not get replaced. For example, if I copy/paste a SO from one artboard to another, that file is no longer "linked" so if I edit that new SO the original does not change, but if I relink to file and update that said SO they all change - which is very weird. Also, if I drag clone/copy a SO from one artboard to next, then when I do edit that new SO the original one also updates. There really seems like there's no rhyme or reason as to how SO and changing content works and Adobe needs to revisit this with to clear and critical thinking to fix in the next update.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 13, 2024 Sep 13, 2024
quote

That is not true, all links do not get replaced. For example, if I copy/paste a SO from one artboard to another, that file is no longer "linked" so if I edit that new SO the original does not change, but if I relink to file and update that said SO they all change - which is very weird. 


By @Todd_Morgan

 

That is not true, I can't reproduce this behaviour, whether copied and pasted onto an artboard or not, edits (or relinking) to one linked smart object affect the other linked smart objects if they are the same file, they are all synchronised unless one uses a method such as my action or script or the manual steps to create a "new linked smart object via copy".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 16, 2024 Sep 16, 2024

nope

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 16, 2024 Sep 16, 2024

almost need to do a video caoture fo this whole process... but still, PSD needs a better way of handling files because as it stands the software doesn't perform properly

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 16, 2024 Sep 16, 2024

and a quick forum search you can see many others have the saem concern...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 16, 2024 Sep 16, 2024

Why not delete the one SO instance and then add the replacement? Since it will no longer be linked, this should be what you want.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 16, 2024 Sep 16, 2024

that's a work around. Would rather have the software work corectly

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 16, 2024 Sep 16, 2024

 

quote

that's a work around. Would rather have the software work corectly


By @Todd_Morgan

 

No, you want it to work YOUR way. That's not "correctly" but rather just your preference (assuming that this isn't a bug, and that its not working as-designed.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 16, 2024 Sep 16, 2024

assume....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 17, 2024 Sep 17, 2024

Yes, that's what you've done. I see no evidence of a bug. Where is your proof that this is not working as designed?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 25, 2024 Sep 25, 2024
LATEST

Huge bug!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 13, 2024 Sep 13, 2024

And have submitted this ask to IDEA many many times to crickets

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines