Stopping the Bot from saving the Project before every render.
-
Hey there,
I want to use the bot with multiple template projects so I set up my data source to open the corresponding project per job.
My Issue is, that I dont want templater to save the Project files while processing in between jobs. I want the project files only to be saved/overwritten by me when I make manual changes to them.
But the Bot keeps saving the Project file before rendering an output.
Optimally I would want the bot to just open the corresponding project file, fill in the data and render the job without overwriting the original file by saving it.
Is there any way to deactivate this save by the bot?
Thanks in advance! -
Thanks for getting in touch with us. While Templater doesn’t have a specific option that controls whether a project is saved after each reversioning task, it should be possible to achieve what you’re describing through the use of Templater Bot’s Event Scripts feature.
To achieve this, we’d need a relatively simple script that gets the name of the open project file, closes that file without saving it, and then re-opens the project. I did some experimenting, and I believe that this script should work for that:
var projectPath = app.project.file.fsName; app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES); app.open(File(projectPath));
We’d want to register the script on the “After creating output” event, which, in theory, should run the script each time an output is produced but before Templater moves on to the next set of data.
One quick note: since AE is going to be re-initialized each time the data is reversioned, we’ll need to make sure that we’re setting all of the options that Templater needs to run in the data. This includes values for
target
,output
,module
, andrender-settings
.Hopefully, that all makes sense, but if you have any other questions, please don’t hesitate to reach out to us here or through the support@dataclay.com email address.
Thanks,
Jeff
-
@Jeff
Thanks for the suggestion, thats kind of the direction I took now. I added some more logic to the script and made it work how I want.
Basically I start the bot from my Template aep, it retrieves the Data for the job, then before it starts rendering (which usually triggered the overwriting save) it saves the Template project as a copy “TEMPLATE_BOT.aep” and renders from that copy file. Then I added another script after the job, which opens up the original template again, also clears my cache, and deletes the copy aep. Then for the next job all over again.
This works perfectly so the original template stays untouched. Exactly what I needed! -
@Jeff Hey! This kept popping into me for quite some time, and I wonder - what is the real use of templater-options key save_on_completion?
Thus, when using through CLI, this option shall preserve original project file / task. However, is there a reason why the same is not supported via GUI? Unless it suppose to do something else. Thanks!
-
Great question. I did some digging, and the reason that we don’t currently surface that option in the UI version of Templater is mainly related to the way that Templater operates when generating versioned replicates.
Due to some quirks in the way that After Effects interacts with project files, it’s necessary for Templater to save the project when performing a replication. However, it appears that this shouldn’t be mandatory when Templater is creating an output via the standard render modules.
I’ll go ahead and put in a Feature Request to see if this is something that we can add as an option to a future version of Templater, but for right now, an Event Script is probably going to be our best solution for controlling whether Templater saves a file in UI mode once reversioning is complete.
If you have any other questions, let us know, and we’ll be more than happy to help out.
Thanks,
Jeff