Scripting AME: odd addDLToBatch behaviour
Dear all,
I stumbled upon, what it looks to me, odd behaviour in the addDLToBatch Code Sample that I don’t understand.
https://ame-scripting.docsforadobe.dev/reference/index.html?highlight=addDLToBatch#methods-4 (Thank you Schücky for this guide!)
Situation:
I have an AfterEffects project opened in AEFT with just 1 comp and 1 layer without any effects.
I save it.
With a button I run the code sample and the project gets added to the queue and gets rendered. All this works as expected. Without any problem I can repeat this over and over.
Where it goes wrong:
I change a layer property in my project, save it (same project name as before), and run the same script.
The project gets added to the batch again, but fails to render. The script result: “Encoding result for the batch item: Failed!”
From the log:
Export Error Error compiling movie. Accelerated Renderer Error Unable to produce frame. Error code: -1609629695
I dealt with this error code before and could always fix it by deleting some effect and applying it again, free up space and what not. But in this case there is not much left to change.
Maybe this is very obvious behaviour, please enlighten me! I just want to change my project and using one click render it in the AME.
I tried a lot, for example: I re-save the aep, manually clear the AME batch/queue and add the project using the script. Then it renders! But emptying the batch with script using removeAllBatchItems() does clear the batch first, but still fails the render.
Adding alerts in the scripts between the various methods also worked, which let me to think that the project was not entirely saved yet before handling, but then replacing alerts with 5000 ms timers (I know… but I was trying to pinpoint the problem) and gave the same failed status again.
Hope somebody can point me in the right direction! Many Thanks!
OSX 13.0.1 (i7) AEFT + AME 23.2.1
