Copy link to clipboard
Copied
I have tried to make a script that relinks to the raw file.
It actually works very well, but it opens the raw converter every time.
Since the whole thing must be run as a batch, I would like to avoid having to press enter key 100 times.
Someone who can help with a way to script through the raw converter without adjusting already adjustments.
Copy link to clipboard
Copied
This is the code im running:
var activeDoc = app.activeDocument;
var filepath = new File(activeDoc.fullName);
var bottomLayer = activeDoc.layers[0];
createSmartObject();
function createSmartObject() {
var idnewPlacedLayer = stringIDToTypeID( 'newPlacedLayer' );
executeAction(idnewPlacedLayer, undefined, DialogModes.NO);
}
function relinkSO(path) {
var desc = new ActionDescriptor();
desc.putPath(charIDToTypeID('null'), new File(path));
executeAction(stringIDToTypeID('placedLayerRelinkToFile'), desc, DialogModes.NO);
} // end of relinkSO()
// Relink active layer(smart object) with a provided file path
relinkSO(filepath);