How do I set the content-aware move tool mode to move
hi,everybody,
How do I set the content-aware move tool mode to move?

hi,everybody,
How do I set the content-aware move tool mode to move?

// select tool
var r = new ActionReference();
r.putClass(stringIDToTypeID("recomposeSelection"));
var d = new ActionDescriptor();
d.putReference(stringIDToTypeID("null"), r);
executeAction(stringIDToTypeID("select"), d, DialogModes.NO);
// set option
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("tool"));
r.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var ret = executeActionGet(r);
var options = ret.getObjectValue(stringIDToTypeID("currentToolOptions"));
var tool = ret.getEnumerationType(stringIDToTypeID("tool"));
options.putInteger(stringIDToTypeID("recomposeMode"), 2); // or 1 for move
var r = new ActionReference();
r.putClass(tool);
var d = new ActionDescriptor();
d.putReference(stringIDToTypeID("null"), r);
d.putObject(stringIDToTypeID("to"), stringIDToTypeID("null"), options);
executeAction(stringIDToTypeID("set"), d, DialogModes.NO);
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.