I'm running a python script in nuke. Something like this in a nuke_simple_python.py:
import nuke vpNode = nuke.ViewerProcess.node() #processing vpNode here
and then run this script like this : <path to nuke exec>\nuke.exe -t nuke_simple_python.py
but it seems that nuke.ViewerProcess.node() creates nothing (and errors out) . I've tried other flags such as -x and -x -t but still fails the same way.
I tried to run the script like this : <path to nuke exec>\nuke.exe -i nuke_simple_python.py
and it fails the same way (but with a GUI box)
If I run nuke normally and in the script editor, copy and paste the contents of the python script, everything runs fine.
Is this something that works in an interactive mode only (and not render mode)? Is there an alternative to this?
Thanks for any help