Liquify - Use Last Mesh or Load Mesh not working

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

User avatar
pedro.marques
Posts: 9
Joined: Fri Aug 19, 2016 2:24 pm
Location: Portugal

Liquify - Use Last Mesh or Load Mesh not working

Post by pedro.marques »

I want to run Liquify automatically (DialogModes.NO) after its 1st manual use on the pixel layer, by moving to its layer mask and apply the same Liquify mesh (last mesh used).

Code: Select all

var meshPath = "/Users/[USERNAME]/Library/Preferences/Adobe Photoshop 2025 Settings/Liquify Last Mesh.psp";
var meshFile = new File(meshPath);

if (meshFile.exists) {
    var desc = new ActionDescriptor();
    desc.putPath(charIDToTypeID("LqMD"), meshFile);
    executeAction(charIDToTypeID("LqFy"), desc, DialogModes.NO);
}
This code doesn't work.

The script listener returns this (it also fails running on the mask and doesn't apply the last mesh used):

Code: Select all

var descriptor = new ActionDescriptor();
descriptor.putInteger( stringIDToTypeID( "commandID" ), -377 );
descriptor.putBoolean( stringIDToTypeID( "kcanDispatchWhileModal" ), true );
executeAction( stringIDToTypeID( "invokeCommand" ), descriptor, DialogModes.NO );