Reply To: Release Clipping masks on all selected objects

#61809

Something like this — each “selection” item is a graphic, which contains images (always one, but it seems Adobe expects to insert more than one; hence the '[0]'). The clipping path itself is a property of this image; and you can immediately set it to “None”. The try .. catch is to prevent abnormal termination if any of the selected items is not a placed image, does not contain an image, or does not contain a clipping path.

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

This article was last modified on March 15, 2012

Comments (0)

Loading comments...