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 » Fri Jan 11, 2019 7:41 am

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: 459
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: custom job alongside the render

Post by timurhai » Fri Jan 11, 2019 9:11 am

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 2.4.0, Ubuntu 18.04 LTS, MS Windows 10 (clients only).

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests