ISAAC SPIEGEL
  • Demo Reel
  • work
  • Blog
  • Contact

Nuggets of knowledge

Setting up a more fluid nuke workflow with custom hotkeys and shortcuts

6/8/2019

0 Comments

 
Picture
One of my favorite aspects of nuke is how easily customizable the interface and user experience is. Having only a minuscule amount of programming knowledge in Python can allow you to tailor nuke in fluid way that fits your personal compositing style. The ability to assign custom hotkeys for specific nodes or operations, adding custom menus for tools, and altering the default properties of nodes have helped save me time as well as keep my node graph more readable. The key ingredient to flavoring Nuke to your heart’s content is editing the menu.py file found in your .nuke folder. Foundry’s online learning database for python is an excellent resource to turn towards if you’re unfamiliar with what the menu.py and the .nuke folder and are looking for a way to get the ball rolling.

Additional information:
menu.py and init.py files
Customizing the UI with menu.py

Recently, I registered for Ben McEwan’s Python for Nuke 101 course and quickly learned some simple snippets of python code that have helped me speed up my compositing workflow. I’d highly recommend this course for anyone who’s new to python and integrating it within nuke. The second lesson from the course was focused on adding shortcuts, menus, and default parameters to nodes for nuke and I’d like to share with you some of my new additions to my menu.py after completing this module. These are primarily shortcuts that I’ve thought up recently and they’ve already made an impact in my compositing workflow. You’ll notice that many of the hotkey changes save only a few keystrokes, but in my experience being able to get the information I need in a shorter time, greatly improves my mental flow when compositing. Saving 2 or 3 clicks here and there may not sound like much but the few seconds it takes to open a menu and find the option or value that you’re looking for can add up through the workweek. The more time you save now, the more time you’ll have for getting started on that next shot, learning something new, or drinking beers at the end of the day.
Tracker Node Default Parameters
The first snippet of code adds some helpful information to the label of the tracker node. Whenever the tracker is created from any menu, the node will automatically display the transform type that node is currently using as well as the reference frame that all transformations will be calculated from. I often find myself having to check the reference frame and being able to see the reference frame printed on the node prevents me from digging through the properties panel.
This second line of code works in a similar way to many framehold labels that I’ve seen in the past. This will automatically set the reference frame on the tracker to the frame number when it was created. You can always edit the reference frame after if you need to change it.
Picture
Motion type and reference frame label

    
Merge Node Default Parameters
This sets the bounding box on the merge node to ‘B’ by default. Cropping the bounding box to the size of the viewer readily discards excess information that isn’t needed to render the final image. When the bounding box in the merge node is set to ‘Union’, nuke will continue to calculate the pixel information that falls outside the boundaries of your viewer and will cause each frame to take a longer amount of time to render.

    
Helpful Hotkeys
I tend to find that everyone has vastly varying preferences on which operations to assign to what hotkey. So, for this section I’ve deiced to include two different methods for binding hotkeys in your menu.py. The first line is a basic method to set the hotkey of the premult node to the ‘u’ key. I find myself dropping down plenty of premult nodes in my script and being able to skip the process of tab keying and typing out the letters has been quite useful. If you’re working on a Linux OS with a windows keyboard you can use the ‘meta’ tag to assign hotkeys to the windows button on the keyboard. The second line displays how you can go about doing this. In my experience, studios will not assign in-house hotkeys using the windows key, allowing you full range over setting your custom hotkeys without the fear of overriding something important.

    
I hope you enjoyed a quick look into some of the python knowledge that I’ve picked up recently! Thanks!
View my profile on LinkedIn
0 Comments



Leave a Reply.

    Archives

    September 2022
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    September 2020
    March 2020
    September 2019
    August 2019
    June 2019
    December 2018

About

Compositing.
Motion Design.
Climbing.
Cooking.
Shiba.

Contact

email:         isaacspiegel.freelance@gmail.com
web:           isaacspiegel.com
instagram: @fuzzymango
  • Demo Reel
  • work
  • Blog
  • Contact