USING PYTHON FOR QUICK FIXES - A PRODUCTION BASED TIP

USING PYTHON FOR QUICK FIXES - A PRODUCTION BASED TIP

One thing I have found recently working as a freelancer in production based roles is that having the ability to perform some menial tasks within Nuke quickly can be a great time saver as well as giving more time to be spent on the creative side of things. This can be true when you enter a production house that does not have certain

So recently I came across a familiar issue of the tracker previews being calculated which annoyingly slowed down working in a script as well as slightly affecting render times. Thus I created a small simple script that I had in my script editor and could quickly run when I opened a new script that had trackers that wanted evaluating - very handy when being given lots of new shots that had already been worked on.


####TURN OFF TRACKERS

for i in nuke.allNodes():

if i.Class()=='Tracker4':

i['zoom_window_behaviour'].setValue(4)

i['keyframe_display'].setValue(3)

i['zoom_window_filter_behaviour'].setValue(2)


All simple enough but I thought, for those who find it any scripting daunting some of the tips to make it easier.

  • I always try and write it myself first. Then when I fail I always jump into Nukepedia or do a google search for someone elses code. But assuming we are going it alone....
  • Always be tidy with your scripts and use #### (how many is up to you...) to label what each part does.
  • Think how you want the user to access the nodes i.e. is allNodes or selectedNodes appropriate?
  • Finding the class of the node you want is easy - just select your node and click 'i' for info. There you have 'class =' and this gives you the info you require. Also note in this case the '4' in 'Tracker4'
  • I always manually adjust the node to the setup I require and check it is doing what I want it to.
  • To see the name of the parameter you wish to change i.e. 'show zoom window' hover over it and a handy help window pops up with the name of the parameter and a handy little description.
  • Remember that the first selection in a drop down is '0' and not '1' and carries on thus. And yes I do write ponsy English sometimes...

It is cool to know that these type of simple scripts are very adaptable and you can easily use it to affect many nodes at once i.e turn off all Vector blurs.

This is the main reason I always have my script editor open and if I have any menial tasks that need doing, it is my first port of call!

Hope this has proved handy. Remember the script editor is your friend....


ABOUT

John Sellings is a freelance VFX compositor / Generalist with experience as a VFX supervisor. He currently lives in London.

linked in Profile here

email: johnsellings.vfx@gmail.com


Loops are our best friends :)

Like
Reply

To view or add a comment, sign in

More articles by John Sellings

Others also viewed

Explore content categories