回答:
这个问题一直困扰着我,找了很多,唯一这个可以解决问题。
使用方法:将下面这段代码复制粘贴到文本工具当中,另存为Jsx格式文件。再PS打开有问题的文档,「文件」——「脚本」——「浏览...」选择保存的Jsx格式文件即可解决。
functiondeleteDocumentAncestorsMetadata(){
whatApp=String(app.name);//Stringversionoftheappname
if(whatApp.search("Photoshop")>0){//Checkforphotoshopspecifically,orthiswillcauseerrors
//FunctionScrubsDocumentAncestorsfromFiles
if(!documents.length){
alert("Therearenoopendocuments.Pleaseopenafiletorunthisscript.")
return;
}
if(ExternalObject.AdobeXMPScript==undefined)ExternalObject.AdobeXMPScript=newExternalObject("lib:AdobeXMPScript");
varxmp=newXMPMeta(activeDocument.xmpMetadata.rawData);
//BegonefoulDocumentAncestors!
xmp.deleteProperty(XMPConst.NS_PHOTOSHOP,"DocumentAncestors");
app.activeDocument.xmpMetadata.rawData=xmp.serialize();
}
}
//Nowrunthefunctiontoremovethedocumentancestors
deleteDocumentAncestorsMetadata();