custom job alongside the render

General discussions and questions.
Post Reply
dagtm
Posts: 8
Joined: Thu Jan 10, 2019 7:34 am

custom job alongside the render

Post 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!
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: custom job alongside the render

Post 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
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply