Questions tagged [nuke]

NUKE is a VFX node-based compositing package created by The Foundry, used for feature films, television, VR, and commercials.

NUKE is a VFX node-based digital compositing package created by The Foundry, used for feature films, television, VR, and commercials post-production.

Scripting in NUKE is generally done in . Prior to version 5, was the only scripting option. The UI of NUKE version 11 is created with and .

If you are new to NUKE programming, there is a Python Developer’s Guide guide at The Foundry website. There's also a Python API Reference to Python.

182 questions
108
votes
6 answers

How do I write to a Python subprocess' stdin?

I'm trying to write a Python script that starts a subprocess, and writes to the subprocess stdin. I'd also like to be able to determine an action to be taken if the subprocess crashes. The process I'm trying to start is a program called nuke which…
jonathan topf
  • 7,897
  • 17
  • 55
  • 85
10
votes
5 answers

Can I use an alias to execute a program from a python script

I am almost brand new to python scripting, so please excuse any stupid questions, but any help anyone can give would be much appreciated. I am trying to write a python script for other people to use, and in it I need to call a program that I won't…
Max
  • 101
  • 1
  • 1
  • 3
6
votes
1 answer

Extracting code to localize it in a callback

This is my first post here so please let me know if I'm doing it wrong. I tried looking for an existing answer, but wasn't sure what to search for. Consider the following simple example, a python module called mymath.py which uses only built-in…
rdutta
  • 61
  • 3
5
votes
1 answer

How to cancel an execution of Write node in Nuke?

I have been writing a Nuke render manager in Python and came across a problem: nuke.cancel() doesn't seem to work right. My python script creates a main class and connects to a server (written in Java) and then enters an infinite loop, each time…
andrey
  • 463
  • 2
  • 8
4
votes
0 answers

Why does Subprocess.Popen run a different Python version to cmd.exe?

I have a script which won't run inside of Nuke's built-in Python interpreter, so I'm trying to launch in via the system's Python instead. I'm using subprocess.Popen to do this, but it still won't run inside a subprocess (missing modules), even…
Spacey
  • 153
  • 1
  • 7
4
votes
1 answer

Python Slow with macOS Mojave 10.14

I'm using Python 2.7.3 on recently installed macOS 10.14 (Mojave). The code is running within Nuke by Foundry. a=nuke.selectedNode() b=a['file'].value() #b now has path to some file u=os.path.split(b) [0] u = os.path.normpath (u) if u != ".": …
KLB
  • 45
  • 5
3
votes
1 answer

Extract a Vector Image or High Res image from Nuke's Node Graph

I am a VFX Teacher and currently when I want to grab images of Node Graphs to use in Lecture slides I have to make the Node Graph full screen and do a screen capture, but as you can imagine with larger scripts I have to zoom out so far that…
3
votes
2 answers

How to find node's width in Terminal mode execution (batch mode)?

Command applied for NUKE's nodes: some_node.width() shows wrong width. Like backdrop width is lesser than node width inside it (is it normal!?) some_node.screenWidth() always shows 0 width in terminal mode. Actually I need it for determine nodes…
Evgeny
  • 61
  • 4
3
votes
1 answer

NUKE expression references top level Camera

I have gizmoB that takes a camera as input. GizmoB lives in GizmoA which also takes a camera as input. I want gizmoB to be able to access the camera via an expression. However nothing I do quite seems to work. The XML-script might better explain…
3
votes
2 answers

Python : export keyframe from maya in line

I am trying to make a script that writes all the desired parameters in a line, not in row, to make a pipe to nuke (keyframe in line) to be valid in nuke, Keyframe need to be like this translate {{curve R x1 list of valueX}} {curve R x1 list of…
William Eguienta
  • 135
  • 1
  • 13
3
votes
1 answer

Python for Nuke: Select node before current

How can I select a node via python before the one currently selected? For example, I want to add a "Clamp" node exactly before all "Write" ones.
3
votes
2 answers

Convert a video file to an image sequence of equal length?

How using FFMPEG do I convert a video file to a sequence of images that is equal in duration/frames to the original video file? I'm trying to import video into the non comercial version of Nuke on Linux which refuses to accept h.264 and doesn't have…
Jeremy
  • 645
  • 7
  • 19
3
votes
1 answer

How to add a Group Knob in nuke using python api

Using tcl script in nuke, adding a group knob to a node looks like this addUserKnob {20 start_group l "My Group" n 1} ... add other knobs addUserKnob {20 end_group l endGroup n -1} It appears that the Group knob uses the same knob type as the Tab…
Brendan Abel
  • 35,343
  • 14
  • 88
  • 118
3
votes
2 answers

PySide widgets using .ui files being garbage-collected unexpectedly

I have a PySide QMainWindow that I'm running in Nuke. Some widgets used by the application use .ui files created in Qt Designer. Until recently, the QMainWindow class was not given a parent. Because of this, when Nuke was minimized or changed…
Brendan Abel
  • 35,343
  • 14
  • 88
  • 118
3
votes
1 answer

Nuke - Matrix4 camera constraint lock Z rotation

So im building a plugin in Nuke (from The Foundry) that will mimic Maya's animation constraint behaviours. I have a parent, a child, and then options for point, orientation, aim, parent constraints. This is all working pretty well, however my…
Alex
  • 95
  • 1
  • 7
1
2 3
12 13