ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Retrieve aeProjectLink from XMP data with Extendscript

COW Forums : Adobe After Effects

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


dan racusin
Retrieve aeProjectLink from XMP data with Extendscript
on Dec 4, 2019 at 11:11:56 pm

Please help! I am trying to get this path stored as a string /Users/dracusin/Desktop/CollectorTestProject.aep

This is from the files XMP. I can see the line in bridge(vie FileInfo) but not in the AE metadata panel.

Here is my current function:


function GetMetaData(){
var item = app.project.activeItem;
var selectedFile = new File($.fileName);
var itemPath = selectedFile.parent.fsName;
var filePath = itemPath + "/" + item.name;
var fileRef = new File(filePath);

if (fileRef instanceof File) {
if (ExternalObject.AdobeXMPScript == undefined) {
ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
}
var xmpFile = new XMPFile(filePath, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_READ);
var xmp = xmpFile.getXMP();
var newXML = xmp.getProperty(XMPConst.NS_CREATOR_ATOM, 'fullPath');
alert("Error: " + newXML);
xmpFile.closeFile();
}
}


This line returns the correct data for some reason:
var newXML = xmp.getProperty(XMPConst.NS_XMP, 'CreateDate').toString();
2019-11-27T19:49:44Z

This line does not:
var newXML = xmp.getProperty(XMPConst.NS_CREATOR_ATOM, 'fullPath');
/Users/dracusin/Desktop/TestProject.aep

Any ideas?


Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]