Nuke scripting

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #205172
    Anonymous
    Guest

    Hey guys,

    I’ve been a Nuke compositor (professionally) for a few years but have limited experience with scripting. Right now I’m working freelance on a stereo 3D project with a few hundred shots, and need an effective way to export everything once the 3D is finished. All the VFX work is done and I’m doing conversion. I developed a Nuke Gizmo that lets me attach a depth map and a finished shot, and with just a few slider adjustments it outputs a left and right eye image with the correct offset for each eye.

    What I’m having trouble with is finding an effective way of splitting the left and right eye and writing each to a separate .mov file. As I said, there are around 300 shots and naming 600 write nodes would be phenomenally time consuming. What would be the best way to script a write node that will automatically export a shot with an appropriate left or right eye tag, followed by the name of the original file I’m inputting to my script. One of the issues I’ve had is that I can’t simply write a script that references the “top” node in the tree, because there is no “top” node since I am starting with a Gizmo that has two inputs.

    Thanks guys!
    Cheers,
    Evan Laffin, Compositor

    #220023
    mariaclark18
    Participant

    Maybe you use some TCL and solve it?

    You can access any node by the name, grabbing the name of the left/right reads.:
    [knob Read1.file]

    and looking at some tcl functions on the manual you can manipulate the strings:
    ex:
    [join [lrange [split [file dirname [knob root.name]] “/”] 0 end-1] “/”]

    Paste these commands on a backdrop node label to test them easily/on the fly

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Copy link
Powered by Social Snap