SourceForge.net Logo

CGRU

LinkedIn
Since 1.6.7 (at 2012.12.03) site moved to cgru.info

Nuke CGRU Render Script.


In command line Nuke can execute a python script in your scene. Script, scene, nuke and script options can be passed in command line arguments. So you can render scenes through a script.

This script will open a scene, render specified node in temporary folder, copy (with overwrite) images in destination folder, delete temporary folder. This can reduce your network traffic a bit. As normally nuke open an empty temporary file and often write there some portions of an image. This script copy an entire image only once, on successful render.

Command:

cgru/plugins/nuke/render.py

Arguments:

Arguments are like in Nuke:

'-x', '--xscene' - Path to scene to execute
'-X', '--xnode' - The name of node to execute
'-F', '--frange', - Frame range to render (Nuke syntax: 'A-BxC' every C'th frame from A to last one less or equal to B)

Usage:

As arguments are like in Nuke, you can simple insert in your render command a string, to use script render:
-t render_script.py

Common Nuke render command:
nuke -i -X Write1 -F1-10x1 -x scene.nk

Modified Nuke render command, to use a render script:
nuke -i -t render_script.py -X Write1 -F1-10x1 -x scene.nk

In afanasy examples, Nuke render launch command is customized in bash script, which launches Nuke:


   # Nuke render launcher:
   export NUKE_AF_RENDER="nuke -i -m %(threads)s"
   if [ ! -z "${CGRU_LOCATION}" ]; then
      export NUKE_AF_RENDER="${NUKE_AF_RENDER} -t ${CGRU_LOCATION}/plugins/nuke/render.py"
   fi

* string '%(threads)s' will be replaced to a number later, in other python scripts.

Since 1.6.7 (at 2012.12.03) site moved to cgru.info
SourceForge.net Project

CGRU

Libre Graphics World