Shotgrid nodes in Deadline

Hi guys;

I am a newbie trying to understand how to render Shotgrid nodes with Deadline.
Can you give me any advice or point me to the right documentation?

Thanks in advance.

Hi Asch75,

welcome to the community.

There are 2 ways to go about this:


1) Convert the ShotGrid Writenodes to normal Nuke Rendernodes before you send the render job. The writenode app comes with a function to do this.

For example, if you run Deadline as your render management software you would use the customSanityChecks.py script for the Nuke Render Plugin to run this bit of code (and also make sure to set Submit Nuke Script with Job so the current script is saved on the renderjob).

import nuke
import sgtk

# save current selected node names
# (because the conversion will not keep the current selection active)
selected_node_names = []
for node in nuke.selectedNodes():
    selected_node_names.append(node.name())
    
# get the sg writenode app and use the conversion function to convert writenodes to normal nuke nodes
writenode_app = sgtk.platform.current_engine().apps()["tk-nuke-writenode"]
writenode_app.convert_to_write_nodes(show_warning=False)

# restore nuke node selection based on saved name list
for name in selected_node_names:
    # get the nuke node with the same name (name should be the same but class has changed)
    node = nuke.toNode(name)
    # select the node
    node["selected"].setValue(True)

When you open the Deadline Nuke Submitter it will run this sanity check script before showing the dialog interface.

The above script ensures all ShotGrid Writenodes in the script are converted to standard nuke Write nodes. It will also restore the selected nodes as the conversion will deselct them.

Submit your job…

The only thing to figure out now is to convert the nodes back to SG nodes after the job was submitted.

code for that would be:

import sgtk
writenode_app = sgtk.platform.current_engine().apps()["tk-nuke-writenode"]
writenode_app.convert_from_write_nodes(show_warning=False)


2) Bootstrap into SGTK from within the Deadline Job before Nuke is run. This is fun but likely not the way for you to go right now...!