Invert Clipping Path Script

Viewing 3 reply threads
  • Author
    Posts
    • #69516
      rydesign
      Member

      I have 1000’s of images with inconsistant clipping paths. Sometimes they come in fine some times they need me to go in to the clipping path options and invert. Is there a script out there that could let me do this so I could apply “Invert Clipping Path” as a keyboard shortcut. It would be a huge time saver for me as it is an on going headache in multiple projects every month.

    • #69517
      rydesign
      Member

      Looking in to scripting it myself now but… I have to learn. I want it to Invert the Paths of selected Items. Trying to gather all the Scripting Items I need. I would be up for someone to hold my hand through the process. Now just to figure out the syntax… Opening some other scripts to try and figure this out.

      For selecting multiple Items – SelectionOptions.ADD_TO
      To choose which path – ClippingPathType.PHOTOSHOP_PATH
      To invert the path – invertPath

    • #69519
      rydesign
      Member

      Fond a script JonWare did for me a while ago and added some stuff. Now it applies the Photoshop Path how do I get it to invert the applied path?—

      for (i=0; i<app.selection.length; i++)
      {
      try {
      app.selection[i].images[0].clippingPath.appliedPathName = app.selection[i].images[0].clippingPath.photoshopPathNames[0];
      app.selection[i].images[0].clippingPath.clippingType = ClippingPathType.PHOTOSHOP_PATH;
      } catch (e)
      {
      // not interested if there is none
      }
      }

    • #69537
      rydesign
      Member

      BAM… Done

      for (i=0; i<app.selection.length; i++)
      {
      try {
      app.selection[i].images[0].clippingPath.appliedPathName = app.selection[i].images[0].clippingPath.photoshopPathNames[0];
      app.selection[i].images[0].clippingPath.clippingType = ClippingPathType.PHOTOSHOP_PATH;
      app.selection[i].images[0].clippingPath.invertPath = 1;
      } catch (e)
      {
      }
      }

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
>
Notice: We use cookies on our websites to give you a great online experience. If you keep browsing, we'll assume you're ok with this. For more information, see our privacy policy. By closing this banner, you agree to the use of cookies.I AGREENo