Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Python tool allowing for Nuke python commands to be executed from outside Nuke
Python
tree: 4fdbb9d0f4

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README
nukeCommandClient.py
nukeCommandServer.py

README

Nuke External Control

This allows you to call Nuke Python commands from outside Nuke


Installation
============

Place nukeCommandServer.py somewhere in $NUKE_PATH
Place nukeCommandClient.py somewhere in $PYTHONPATH

Edit your Nuke menu.py and add the following lines:

---------------------------
import nukeCommandServer
nukeCommandServer.nuke_command_server()
---------------------------

Usage
=====

To initialise the external end, run the following (while Nuke is running):

---------------------------
import nukeCommandClient
conn = nukeCommandClient.NukeConnection()
nuke = conn.nuke
---------------------------

From that point on, you can run anything that you would inside Nuke from outside:

---------------------------
for n in nuke.selectedNodes():
	print n.name()
	n['disable'].setValue(True)

blur = nuke.createNode("Blur")
---------------------------

If you need to import a module inside Nuke, you can run:

---------------------------
nukescripts = conn.import_module("nukescripts")
---------------------------
Something went wrong with that request. Please try again.