After Effects toolkit publishing on the farm

Hello,

I’ve followed this tutorial to set up a farm job wrapper hook that allows me to run certain publish tasks on the farm using this script to rebuild and run the publish tree on a render node.

It’s working great for DCCs with dedicated Python APIs, but now I am trying to add After Effects to this framework so that I can run its render queue item publishing tasks on the farm.

Capture

So far, I see no obvious way to do this as AE does not have a Python interpreter friendly way of loading a scene (project) and executing the Shotgun toolkit publish tree, at least none that I could find.

What is the best way to go about this? I would be very interested to find out best practices for After Effects toolkit publishing on render nodes, thanks!

4 Likes

Hi @viktor_petrov,

Just had some notes back from engineering, sounds like it’s a bit more complicated than with other DCC’s;


Should be possible, not straight forward, extra work required. Will need to launch AE from tk-shell much like we do from desktop, as AE doesn’t have a python interpreter.

As the for AE render script logic, you would need some way of running it once AE launches with TK. Perhaps the engine_init.py core hook would work, and you would need to have some way of knowing if it was running on the farm, maybe an env var?

-David

5 Likes

Thanks for letting me know @DavidMason

Just to confirm I understand your feedback from engineering:

So the farm job would actually just be a shell job which only starts After Effects, correct? Also, how would I then go about closing AE after the publishing tree is done? An example of how that would look like would be great!

Does the engine_init.py hook run right after AE has started? If so, do I need to start the publishing process from that hook? Regarding the environment, we’re already keeping track of whether or not publishing is being done on the farm with an environment variable.

3 Likes

Yes that’s what I’m thinking.

I’m not sure of the exact method here, you should be able to access the adobe API via engine.adobe, and then hopefully they have a command that will close the application?

The engine_init.py is a core hook that is run after the toolkit engine has finished starting. So you will need to check that the engine is aftereffects in there (off the top of my head it is something like engine.name == "tk-aftereffects")and that you are on the farm, but the engine init will be called once aftereffects has started and the engine has launched, I think.

I’ve not actually tried any of this, so there may be things that I’ve not considered, but I believe you should be able to get this to work on the farm.

4 Likes

Thanks for clarifying @philip.scadding

I’ll see what I can come up with based on everyone’s notes, thanks!

1 Like