Hi there, this is my first rodeo with UXP so I’m sorry in advance if I’m doing something terribly wrong.
I’m converting a layer to smart object and then open it and make some modifications. What I’m unable to do is after those modifications is saving the .psb which is usually saved in a temp folder so the original document updates the smart object. This is a snippet of what I have so far:
const result = batchPlay([
// DUPLICATE LAYER
{
_obj: "duplicate",
_target: [{
_ref: "layer",
_enum: "ordinal",
_value: "targetEnum"
}],
version: 5,
ID: [
25
],
_options: {
dialogOptions: "dontDisplay"
}
},
// CONVERT TO SMART OBJECT
{
_obj: "newPlacedLayer",
},
// EDIT SMART OBJECT
{
_obj: "placedLayerEditContents",
_options: {
dialogOptions: "dontDisplay"
}
},
// DO STUFF
// SAVE TBD
//CLOSE
{
_obj: "close",
_options: {
dialogOptions: "dontDisplay"
}
},
], {
synchronousExecution: true,
modalBehavior: "fail"
});
I’ve been checking what’s going on when I save using Alchemist but none of the listened events when saving seem to work.