Question
Set InDesign image Clipping Path to NONE
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:
function main(){
for(var i = 0; i < cur_obj.length; i++){
try{
if(typeof cur_obj[i].graphics[0].clippingPath.photoshopPathNames[0] != 'undefined'){
cur_obj[i].graphics[0].clippingPath.appliedPathName = cur_obj[i].graphics[0].clippingPath.photoshopPathNames[0]
}
}
catch(e){}
}
}
try{var cur_obj = app.selection}
catch(e){exit()}
if(typeof cur_obj != 'undefined' && cur_obj.length != 0){
app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'clip')
}
