Nuke hotkeys for Houdini


Audun Ase
April 15, 2021

When I started to learn Nuke back in the day. The first thing I picked up was the intuitive hotkeys. You could select nodes, slap a key and instantly get useful nodes already wired up. We can do this in Houdini! This is a trick I picked up during my time at The Mill, when I noticed people were using Nuke-like hotkeys in Houdini! I've taken the time to assemble it for you, so you can simply download and use out of the box.

Where's the secret sauce?

It's on the shelf!

It's really simple, but super powerful. I've spent some time polishing it up, in order to make it more robust and added a few more functions that I'm very excited about. At the end of this post you'll be able to download the files you need, but first I'll explain how it works.

The first hotkey I want from Nuke, is the merge hotkey. In Nuke, if you select a bunch of nodes and press M it will automatically add a merge node and connect them together.

Merging nodes

I am aware that Houdini do support this feature by default. All you have to do is select all the nodes you want to merge, and hold ALT and click the output of one of them to automatically connect.

Now this feature itself is great, but I'd much rather prefer to have a hotkey to do this. Not only do we avoid having to click that little dot at the bottom of a node, but we could have python do a little bit extra. And we can have it change based on our context!

Similar to a previous entry "Store Selected" you'll need to set up a shelf tool. I'm going to assume that you know how to do this. Then copy and paste the following python code into the newly created shelf.

<p> CODE:</p>

Once the shelf has been named and created, you can move on to adding a hotkey. I named my shelftool mergeNodes, which is handy to know when editing hotkeys as you can do a search for it.

If that has been setup correctly, you are ready to go! Simply select your nodes and hit M.

Neat! That's working!

If you copied and pasted the script above, you have already completed the implementation of this next step. Let me explain why this next feature is so good. In the script I've written these two lines.

<p> CODE:</p>

This will simply try and create a merge node first, then attempt to create a multiply node.

The reason I'm doing this is that if we happen to be inside an attribute vop instead of sop context, it will create a multiply node. Keep in mind this could be any node you want, but I feel that the "multiply" vop is used so many times that it makes sense to include this to our hotkey. If however there was a case where you want the same hotkey to create two different nodes or more based on your current context, you should be able to replace the try/except function with an if statement checking the type of the current context. If anyone is interested in this let me know in the comments bellow as I will not be adding this as of yet.

Moving forward,

I hope you enjoyed this little nugget of info. I'm really enjoying writing these smaller workflow related tips and tricks as they are much faster to do, which in return mean I can do more of them.

If you want to further expand on this you can simply copy this script, rename it and you can create as many hotkey operations as you wish. I've uploaded the ones that I currently use on a daily basis as listed bellow.

Audun out...

Associated Files

No associated hip files found
An old fashioned disk

Nuke Hotkeys Shelf