Nuke – The Amazing AutoWrite Node by Tim Bowman

I thought I’d share this beauty with you all.

I’m currently working as part of a two man comp team and as such we are missing so many of the lovely scripts and buttons you get when you work in a large facility. Finding this little beauty is going to save us a lot of time. It wasn’t completely plain sailing to install so I thought I would share my findings here.

The node automatically creates and names the folders to render to based on your script name.  Genius!  And a huge time saver.

The Autowrite node is written by Tim Bowman and can be downloaded from Nukepedia.

AutoWrite v1.0

autowrite1

It takes the existing write node and adds Python to it that works out your directory structure based on your current Nuke script location. The numbers in the window above are changed to suit your pipeline.  The node has a read out in the node graph – this gives you feedback on where the write node is going to render to.  This is a very useful feature.

The tricky part of using the node comes when you want Nuke to create the directories when they don’t already exist. Also in our two man team we wanted the write node to overwrite anything that’s there already (this last part proved difficult to find the code for).

Add the following to your init.py file and all will be well with the world… and your Autowrite node.

def createWriteDir():
#Create dir callack
def createWriteDir():
import nuke, os, errno
file = nuke.filename(nuke.thisNode())
dir = os.path.dirname( file )
osdir = nuke.callbacks.filenameFilter( dir )
# cope with the directory existing already by ignoring that exception
try:
os.makedirs( osdir )
except OSError, e:
if e.errno != errno.EEXIST:
raise
nuke.addBeforeRender(createWriteDir)

It took me a while to work out this part of the puzzle.  It uses the callback Python function ‘beforeRender’.  This is run before a render is executed.  It checks if the directory structure for the write node exists and if it doesn’t it creates it.

Nuke Callbacks

Happy rendering.

Nuke – Framehold Using Current Frame

When I create a FrameHold node I’m normally on frame I want to… well… frame hold.  Therefore wouldn’t it be great if Nuke held the frame you created the FrameHold on?  Well now it can with this simple piece of Python.  Just pop it in to your menu.py file in your home/.nuke folder and off you go.

# FrameHold creation frame
nuke.menu('Nodes').addCommand( "Time/FrameHold", "nuke.createNode('FrameHold')['first_frame'].setValue( nuke.frame() )", icon='FrameHold.png')

framehold

It uses the nuke.frame() function which calls the current frame.

Happy frame holding!

Thanks to David Emney for the heads up on this.
FrameHold default to current frame

Nuke – Backdrop Utility by Geoffroy Givry

backdrop1 Nukes backdrop feature promises to keep your scripts neat and tidy and in order… but it seems to always want to pick bright pink or fluro orange! 18% grey please Nuke!

Luckily Geoffroy Givry has come up with a nifty little python script that replaces the backdrop feature with a far superior utility.  A name can be added to the group, the font size can be adjusted and the colour always defaults to… grey!  Other muted tones can also be selected.

The python script can be downloaded from Nukepedia.

labelAutobackdrop v1.0

Place the labelAutobackdrop.py file in your home/.nuke folder.  Then add the following to your ‘menu.py’ file which should be in same location (or create a ‘menu.py’ file if you don’t see one)…

# setup autoBackdrop in toolbar
import labelAutobackdrop
menuToolbar = nuke.toolbar('Nodes') 
menuToolbar.addCommand('Other/Backdrop', 'labelAutobackdrop.autoBackdrop()', 'Alt+m')

backdrop2There’s a script on the Nukepedia page that Givry suggests putting in to the ‘menu.py’ file.  When I tried it I couldn’t get it to work.  Anyone out there have an idea as to why?

Geoffroy Givry’s website.  Click on Python Corner to see his other scripts.
http://www.geoffroygivry.com

On a side note – here’s a great tutorial from David Windhorst about how to install custom menus and adjust your ‘menu.py’ file.
DW// Tutorial 01: Nuke – Install Scripts/Custom Menus

Thank you to Jason Evans for the pointers on this!

Into Film

When I was at Primary School having a career in film seemed impossible and never really crossed my mind (well of course… I was going to be an astronaut!).

Into-FilmBut now there is an organisation that helps young children realise it’s not an unattainable dream.

Into Film are taking this idea of working in the film industry to children all around the UK. They are inspiring the minds of the next generation of film makers. Last year I was lucky enough to be invited by Into Film to Kingswood Academy in Hull to talk about my career and meet some of the visual effects artists of the future! It was a great experience and I’d recommend it to anyone.

Click below to read about the visit and find out more about Into Film.

Digital Compositor Jack Hughes visits Kingswood Academy, Hull

Ant Man – The Russian Movie Poster

img_3840

This week as I wandered around Saint Petersburg I came across this beauty.

The Russian poster for Ant Man has got to be the hippest released. It has the look and feel of an old Polish film poster from the 80’s – very bold and a little left field. It’s a striking concept that I’ve not seen in the UK. 

There’s a nice use of Captain America’s shield design around the outside and then a very abstract picture within a picture going to infinity in the centre. Oddly, Paul Rudd has his helmet on in his second depiction. I guess he has to have his helmet on to miniaturise?

After seeing this poster I wonder whether Ant Man might actually be a Marvel film with a mind of it’s own?

Congratulations to anyone that worked on the project.

Nuke – The Hidden AutoCrop Script

This a great little script that can help to optimise your comp tree by setting the Bounding Box in an image stream.

Selecting the node your want to set the Bounding Box on.  Hit ‘X’ (to start the Script Command window) and change the script language to Python.  Then enter the following…

nukescripts.autocrop(first=None, last=None, inc=None, layer="rgba")

Nuke will run the CurveTools AutoCrop function, copy the autocropdata in to a Crop node and then delete the CurveTool.  Genius!

‘first’ and ‘last’ refer to the frame range you want to analyse.  If NONE is set it will use the Project Settings.  ‘inc’ is the increment.  ‘layer’ is the layer or layers you want to analyse.  It’s good to set it to ‘a’ (alpha) for any premulted CG you receive so you can be sure your getting all the data down stream.

I’ve created an python script to help with running this command.  It can be downloaded from Nukepedia.

autoCrop_MB

Here’s a great video from The Foundry on understanding the Bounding Box…

Bounding Box – NUKE Basic Workflows