ps太卡

删除ps元数据.jsx

function deleteDocumentAncestorsMetadata() {  
    whatApp = String(app.name);//应用程序名称的字符串版本
    if(whatApp.search("Photoshop") > 0)  { //检查PS图象处理软件元数据,或将导致错误
        //取消文件的元数据功能
        if(!documents.length) {  
        alert("没有打开文档。请打开一个文件以运行此脚本.")  
        return;   
        }  
        if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
        var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
        // Begone foul Document Ancestors!  
            xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");  
            app.activeDocument.xmpMetadata.rawData = xmp.serialize();  
         }  
}  
//现在运行这个函数来删除元数据
deleteDocumentAncestorsMetadata();

posted @ 2018-12-09 11:31  小九家的丫头  阅读(222)  评论(0编辑  收藏  举报