Skip to main content
Inspiring
October 24, 2024
Question

Has exportasmotiongraphicstemplate() become really unreliable?

  • October 24, 2024
  • 1 reply
  • 606 views

I'm not in a position yet to post a thorough bug report on this, but has anyone else been encountering problems with exportasmotiongraphicstemplate() lately? Problems started with the move from AE 23.x to AE 24.x, when AE began insisiting the project be saved between exports, which really limited the utility of the operation for batch MOGRT export scripts. It seems that AE was marking the project as dirty each time it reopened the project after exporting a MOGRT. I was able to work around this by incorporating a save operation, but now the MOGRTs sometimes end up corrupted, with Essential Graphics controls in Premiere being blank or not working correctly (menus appear to have no entries, default text values are blank). And now AE is simply crashing when I try to do a batch export.

 

Is anyone else encountering any of these issues?

1 reply

Inspiring
January 15, 2025

Hi Aaron.
I can't export MOGRT via api at all, I get false in the 2024 version of After Effects.

Adobe knows about this error - https://community.adobe.com/t5/after-effects-bugs/after-effects-24-2-1-exportasmotiongraphicstemplate-not-returning-correct-value/idi-p/14444100, but did not do anything, since in version 2025 it still does not work

Inspiring
February 4, 2025

I've posted a bug report on my issue as well, which I suspect is related: https://community.adobe.com/t5/after-effects-bugs/after-effects-24-2-1-exportasmotiongraphicstemplate-not-returning-correct-value/idc-p/15130591#M13998

 

I don't think the false value actually indicates a real export failure. I think what is happening is the export function is returning a value before the operation is complete. I have been able to get a script to export MOGRTs successfully, but the operation isn't blocking execution of the javascript, so I am working on figuring out out how to check for completion of the export. The best I can come up with so far is to use a while loop (with a fairly long timeout) to check that the .mogrt file got written, but this is a really unsatiisfying solution.

Inspiring
February 17, 2025

So far this method is working for me. If you are allowing your script to overwrite files you have to not only check whether the destination file exists, but if it does exist you have to also compare the file's .modified property to the time you started the export to make sure the file was overwritten.


In order not to compare the files.
You can check the existence of the file before export and delete it. And after that export