Warp ARC not working

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

rhytha

Warp ARC not working

Post by rhytha »

Hi,

We are trying to use the WARP and the ARC to bend an image, but these functions are not working, like to know if any one else faced this problem...

Code: Select all// Transform
  function step2(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
    desc1.putReference(cTID('null'), ref1);
    desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSAverage"));
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Pxl'), -2.27373675443232e-13);
    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Pxl'), 0);
    desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);
    var desc3 = new ActionDescriptor();
    desc3.putEnumerated(sTID("warpStyle"), sTID("warpStyle"), sTID("warpArc"));
    desc3.putDouble(sTID("warpValue"), 10);
    desc3.putDouble(sTID("warpPerspective"), 0);
    desc3.putDouble(sTID("warpPerspectiveOther"), 0);
    desc3.putEnumerated(sTID("warpRotate"), cTID('Ornt'), cTID('Hrzn'));
    desc3.putInteger(sTID("uOrder"), 4);
    desc3.putInteger(sTID("vOrder"), 2);
    desc1.putObject(cTID('warp'), cTID('warp'), desc3);
    executeAction(cTID('Trnf'), desc1, dialogMode);
  };


THe above code does not execute in photoshop after we make a selection.

thanks

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mike Hale

Warp ARC not working

Post by Mike Hale »

The code you posted is a function. For the code to do anything you need to call the function. Something like...

Code: Select allstep2(true, false);
rhytha

Warp ARC not working

Post by rhytha »

Hi Mike, yes, i am calling at this function using step, but the warping function is not working.