c.pfaffenbichler Yeah , @Stephen_A_Marsh ’s original advice sort of works and and can be recorded in an action. The main problem is having a smart object inside another smart object . The purpose of SOs is to keep original image pixel resolution available in case you upscale something . But once you created another smart object (parent) with linked SO (child) inside that new SO (parent) has a pixel size of its current state. And if later you upscale it you get a weird thing of low res SO (parent) upscaled while it still keeps Hires child source inside but no way to transfer those pixels to update parent one .
The purpose of all this is to have stored alphas from resource files accessible for masking/clipping groups. I tried to use sbsar in beta that reveals any necessary channel from any linked image but it works slow as hell. And so far I see only way is to make linked SO embedded first, copy it by via copy and do re-link the original one back to source file.
Trying to task chatGPT for that but it makes some not working piles of code 😞
Finally, after research the issue, chatGPT told me Photoshop scripts just can't relink file automatically . only save . So looks like it's a deadend.



// if active layer is linked smart object create embedded duplicate;
// 2023, use at your own risk;
if (app.documents.length > 0) {
var myDocument = activeDocument;
var theLayer = myDocument.activeLayer;
if (isLinkedSmartObject() == true) {
var theDup = myDocument.duplicate("temporal", false);
embedLinked ();
theDup.activeLayer.duplicate(theLayer, ElementPlacement.PLACEBEFORE);
theDup.close(SaveOptions.DONOTSAVECHANGES)
};
};
////// embed linked smart object //////
function embedLinked () {
try {
executeAction( stringIDToTypeID( "placedLayerConvertToEmbedded" ), undefined, DialogModes.NO )
} catch (e) {}
};
////// active layer is linked smart object //////
function isLinkedSmartObject () {
try {
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var layerDesc = executeActionGet(ref);
var soDesc = layerDesc.getObjectValue(stringIDToTypeID('smartObject'));
isLinked = soDesc.getBoolean(stringIDToTypeID("linked"));
if (isLinked == true) {return true}
else {return false}
} catch (e) {return false}
};