Page 1 of 1

custom job alongside the render

Posted: Fri Jan 11, 2019 7:41 am
by dagtm
Hi,

I'm still fresh to the package and trying to get my head around but my goal is to push custom job next to my renders on the farm.
In depth - I would like to push publishing job to my database (with information regarding rendered images) and ideally get this data via python API if possible.

alternatively i could create custom script for each software (Nuke/Houdini) that would run on frame finished and try to get info from Nuke/Houdini API.

Could you suggest best approach to achieve this? Thanks!

Re: custom job alongside the render

Posted: Fri Jan 11, 2019 9:11 am
by timurhai
Hi.

Create a wrapper scripts for all software is a good approach.
( We have custom wrappers for all commands that Afanasy launches )
In that wrappers we can do anything before and after the command, even parse/change command output before Afanasy Python parser if needed.

Also you can use own Python service classes. For example nuke.py:
https://github.com/CGRU/cgru/blob/maste ... es/nuke.py
just inherits service.py:
https://github.com/CGRU/cgru/blob/maste ... service.py
So you can override some class methods.
For example you use class constructor for pre-execution actions.
For post-execution actions you can use:
https://github.com/CGRU/cgru/blob/maste ... ce.py#L316
https://github.com/CGRU/cgru/blob/maste ... ce.py#L333