ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Retrieve aeProjectLink from XMP data with Extendscript

COW Forums : Adobe After Effects

Respond to this post   •   Return to posts index   •   Read entire thread

Walter Soyka
Re: Retrieve aeProjectLink from XMP data with Extendscript
on Dec 5, 2019 at 2:53:58 pm

I couldn't figure out the clean way to do this -- NS_CREATOR_ATOM doesn't seem to be a registered namespace -- so here's a hacky code fragment to do it instead:

var xmpFile = new XMPFile(filePath, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_READ);
var xmp = xmpFile.getXMP();

// take the whole XMP object and make it into a string so we can parse it manually
var xmpString = xmp.dumpObject().toString();

// use a regular expression to find the fullPath item of the aeProjectLink struct of the creatorAtom
var creatorFsName = xmpString.match(RegExp('(.*creatorAtom:fullPath = ")(.*)(")'))[2];


You should add some error checking to this, because as written, it will fail hard if there's no project link data.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]

Posts IndexRead Thread 

Current Message Thread:

© 2020 All Rights Reserved