Hello everyone,
I’m currently working on some features related to converting .atn files into UXP code, but it seems that some things are not working for certain reasons.
In Photoshop, I use Insert Menu Item… to insert a filter (Gaussian Blur, Median, etc.) into an action, then save it as an .atn file.
When converting the .atn file, it produces code like this:
{ "_obj": "gaussianBlur" }
In UXP, I convert it into:
async function applyGaussianBlur() {
return await action.batchPlay([
{
"_obj": "gaussianBlur",
"_options": {
dialogOptions: "display"
}
}
], {});
}
However, when running it, Photoshop throws the following error:
could not complete the Gaussian Blur command because of a program error
Meanwhile, in ExtendScript, this works perfectly with just a single line:
executeAction(stringIDToTypeID('gaussianBlur'), undefined, DialogModes.ALL);
Does anyone know why this behavior is different in UXP, or if there is a proper way to execute filters without explicitly passing values?