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!