top of page
  • satheesrev

Connect Roto to Tracker

Updated: Mar 16

This script lists all the available Tracker node in the script. It connects the transform value to the selected Roto node.

import nuke

def connectTrack():

    for selRoto in nuke.selectedNodes('Roto'):

        if not selRoto:

            nuke.message('No Roto node selected')

        if selRoto:

            trackers = ' '.join([ for n in nuke.allNodes('Tracker4')])

            if trackers:

                panel = nuke.Panel("trackConnect", 200)

                panel.addEnumerationPulldown('Tracker_nodes', trackers)



                result =

                selTrack = panel.value('Tracker_nodes')


                if result == 0:



                    sel = nuke.toNode(selTrack)







                nuke.message('no 2D trackers found')

Alternate way to connect the Tracker info to the Roto node while node creation.

import nuke, os, re

def trackRoto():

        sel = None


                sel = nuke.selectedNode()

                X = sel.xpos()

                Y = sel.ypos()

        except ValueError:  # no node selected


        if sel is None:

                rt = nuke.createNode('Roto')

        if sel:

                NodeType = re.sub(r"\d", "", sel.Class())

                print NodeType

                if NodeType == 'Tracker':

                        rt = nuke.createNode('Roto')

                        rt.setInput(0, None)








                        rt = nuke.createNode('Roto') lines:

import trackRoto

n = nuke.toolbar('Nuke')

n.addCommand('Edit/trackRoto', 'trackRoto.trackRoto()', 'O')

4 views0 comments

Recent Posts

See All

Automatically pin the Cornerpin in Nuke

This little code place the cornerPin nodes 4 pin's automatically based on the bbox. If your image dosen't have bbox add a crop node and crop it as per your need. import nuke def autoPinning(): selNode


bottom of page