Copy link to clipboard
Copied
I'm new to scripts in InDesign, and need a script to switch selected images Clipping Path to type NONE.
I have found a great script that switches the clipping path on if there is a photoshop clipping mask saved in the image, but I don't know enough to back engineer it. Any help greatly appreciated.
Here is the script to switch clipping paths on:
Copy link to clipboard
Copied
In your loop, just need this line, probably wrapped in a try/catch block.
cur_obj[i].graphics[0].clippingPath.clippingType = ClippingPathType.NONE;
Copy link to clipboard
Copied
Thank you Brian,
I have absolutely no experience in writing scripts. Would you be able explain where I would insert that and what I would need to remove from the original script?
Copy link to clipboard
Copied
If you just want to do it for a selection, you can use this one line (assuming the containing rectangle, not the image itself, is selected).
try { app.selection[0].graphics[0]..clippingPath.clippingType = ClippingPathType.NONE; } catch(e) {}
If you want to do it for all graphics in a doc, then you'd use that loop you posted with this change:
Find more inspiration, events, and resources on the new Adobe Community
Explore Now