I'm working on an upload plugin to send an AE project and it's assets to another system.
Does anyone know if the "File -> Dependencies -> Collect Files..." funcitonality is accessible through ActionScript? I see the consolidateFootage() and reduceProject() methods available on the app.project object but don't know if Collect Files is exposed anywhere.
Any advice would be greatly appreciated.
The command itself may easily be scriptable through the executeMenuCommand() function, but I'm not certain if the various sub-options on the dialog panel can be set this way. This stuff tends to be rather inconsistent.
As far as I know, it is not exposed to scripting, unfortunately. So as Mylenium suggested, you can execute the menu command, but this will only open the dialog. The only other - very tedious - option is to implement it yourself.
Thanks Mylenium and Mathias, it seems you're both spot on, executing the below opens the dialog:
but I can't interact with it through code.
Thanks for the advice, time to look into relinking assets manually.
Exporting a MoGRT (from the Essential Graphics Panel) invokes the Collect Files routine - it's a 2-in-1 thingy. You end up with a MoGRT instead of an AEP. You can then open the MoGRT in AE. The only downside is that you won't be able to IMPORT the MoGRT into an existing AEP without first opening it and then resaving it as an AEP. You can of course do all of this prior to sending out the files and hence, only send an AEP. And MoGRT export is scriptable.
Wow, that's a clever workaround, Roland!
Only the BEST for you my friend. 🙂
Thats ingenius, as you say the comp.exportAsMotionGraphicsTemplate() function lets me bundle up everything into a .mogrt file, what an idea!
Apologies for the delayed response, I've been trying to open the template and resave it as an AEP but hit another wall. When opening the file from the GUI, AE brings up a promp to "Extract .MoGrt into folder," I don't suppose you know if this is scriptable too?
Running the standard app.open() command seems promising but returns an undefined as I guess it doesn't know how to handle that extract process.
It might be too much to hope for, thanks for your suggestion so far anyway!
It's a good thing you reported back cos I recall a *.mogrt file is essentially a ZIP package.
Try these steps. Rename the *.mogrt file as *.zip and unpack it. You'll end up with a *.aegraphic file. Then, again rename the *.aegraphic as *.zip and unpack this. And VOILA! You'll end up with a functional *.aep!
I'll send you an invoice tomorrow!
Roland thank you very much, that seems to do the trick!
Thanks again all, your expertise is very much appreciated!