top of page

The School of Gizmo Pt.1.

Everything You Always Wanted to Know About Gizmos* But Were Afraid to Ask

What is a Gizmo anyway?

Very simply, a gizmo in Nuke is a group of nodes bundled together.

These bundled nodes should(!) make a work more efficient and the scripts more organised.

Gizmos are misunderstood parts of Nuke as poorly built ones often cause issues in studios.

It is advised to work with gizmos where the internal working is known or there is a labelled origin.

Where can I find gizmos?

There are thousands of gizmos available for free, most of are them on Nukepedia.

Gizmos are very easy to make in Nuke, therefore there are so many of them.
Not all of them are equally useful or made with a same care, some are actually broken or harmful.

The best collection of useful and safe nodes so far is Tony Lyons' Nuke Survival Tool Kit.

There are many artists and developers who share their own tools on their websites.

More and more people choose to share their tools on GitHub.
It is professional website used for software development and allows users to collaborate.

This is my public .nuke where I keep gizmos and other tools.

Most compositors have their own preferred tools to handle certain tasks.

Many carries their collection and other customisations around with them. 

VFX studios have different policies and safety measures when it comes to dealing with gizmos.

Whether you want to install or upload tools / codes best practise is to discuss it with your HoD. 

How can I recognise a Gizmo?

001.jpg

On the left side there is a Group which can be converted into a Gizmo, that is on the right side.

When a Group becomes a Gizmo it will change shape so you recognise them by the square left side.

You can also easily recognise them when a certain node is copied to the Text Editor:

002.jpg

Here, before the opened curly bracket  ( { ) you can see the Class of the node.

When a Group converted into a Gizmo, it won't have a name anymore.

A gizmo's name must come from the python code that creates it, othrerwise it will be called just "Gizmo1" on the Node Graph.

How can I make a Group?

All the essential Group related functions are located in the top menu at Edit / Node / Group / ....

004.jpg

Easiest way is to have your selection of nodes and press Ctrl+G ( Collapse To Group ).
If you have multiple output opened Nuke will ask you to choose a position of the Output node:

005.jpg

After creating a Group you will have a new tab on your Node Graph.
You can either click on that or select your new Group and hit Ctrl+Enter ( Open Group Node Graph ).

006.jpg

You can also click on the S on your Group's properties to open its Node Graph.

007.jpg

Now you made a Group and know how to access it!

You can have multiple Inputs but only one Output.

How can convert a Group into a Gizmo?

All Groups have an export as gizmo... button on the Node tab.

When clicking on it a file browser window pops up that you can use to save your Group as a Gizmo.

008.jpg

How can I open the saved Gizmo in Nuke?

In order to be able to access your Gizmo from Nuke you need to use your .nuke folder which is a place designed to add your customisations to Nuke.

003.jpg

1. You have your exported Gizmo file. I named this "MyTestGizmo"

2. I put this in a subfolder into my .nuke folder which I named "gizmos". Technically, you can just put the gizmo into the .nuke folder but it's more organised if you use subfolders. 

( In order to be able to load in gizmos you need to add the following code to your init.py:
nuke.pluginAddPath('./gizmos')

3. Adding a code to the menu.py using the addCommand function that creates the gizmo using the createNode function. All under a menu ( GM_Menu ) that I previously created using the addMenu function.

GM_Menu = nuke.menu('Nodes').addMenu('GMmenu', icon="gm_icon.png", index=20)

GM_Menu.addCommand('New_Gizmo_Name', 'nuke.createNode("MyTestGizmo")')​

( Note: depending of the complexity of the workflow you are adding your tools into this code can happen to be in different locations. My example here is focusing on the simplest application. )

4. When it's all done a new item appears on the menu using a name from the code

( New_Gizmo_Name ) which will create the node stored in the .gizmo file.

That's it! If you done all that you managed to make a plug-in!

How can I convert a Gizmo back to Group?

The easiest way is to use the Copy to group button on the node which creates a

group copy of the gizmo ( also Ctrl+Shift+G ):

010.gif

Using python in the Script Editor you can also use the makeGroup function.

nuke.selectedNode().makeGroup()

What's the best way to store my tools in Nuke?

As long as your tools are not converted into Gizmos the easiest way to store them is Nuke's Toolset.

This is the part of Nuke that comes with some added setups and other useful things but also

allows you to Create / Delete your nodes.

You can use forward slash to create subfolders.

012.gif

All the added nodes are saved into the .nuke folder into the Toolsets subfolder:

013.jpg

Are gizmos plug-ins?

Technically, yes. Plug-ins provide specific features to extend user experience developed by a third-party that can be used by other users of the software after installing it.

It also means that Groups are (technically) not plug-ins as Groups don't need to be installed to run.

There are different kind of plug-ins available for Nuke:

- Gizmos: Require addCommand function to be run in Nuke. As Nuke scripts are TCL based these are also, technically, TCL tools. However, different parts of a gizmo can contain other languages such as Python, TCL, HTML and Blink.

- Other TCL tools: This is in practise the smallest group as there just aren't many TCL developers around anymore but Nuke itself still runs TCL procedures and so others can be developed and added to Nuke also. I wrote about the native ones here.

- Python tools: These are a combination of classes or functions that can be added to the Nuke's menu. For certain tools you need to make sure that a required not native modules are installed to be able

to use it.

- C++ tools: Nuke's NDK (Native Developer Kit) is C++ based and allows third parties to develop new tools. The Foundry has a list of third-party tools here. And has an extensive developer guide on how to use it.

The Foundry provides a guide on How to install plugins.

Should I use a Group or a Gizmo?

There are no official guidelines on when you should be using gizmos or groups.
However, there are a couple of things that worth considering before choosing either.

GIZMO PROS

- Easy to install and can be managed from a centralised location.

- Updating them across the project / studio is easier.

- Due to a centralised location, it is also easier to fix them if broken.

- Makes the script files (.nk) lighter as there are less text in them.

- Less likely that artists would modify inner working.

GIZMO CONS

- Backward compatibility can be a real headache if the gizmos not archived along the project and scripts need to be accessed later.

- Due to a centralised location, it is also easier to break multiple scripts if the gizmo is not maintained or updated properly.

- As gizmos are basically reference files to a certain location on the drive that is not Nuke's native path it is more likely that permission issues occur when sending a script to a render farm if system is not managed properly ( or due to Linux bugs ).

GIZMO SUMMARY

Gizmos can be great allies in a properly maintained and capable environment where can make the work faster and more efficient. On the other hand, gizmos can cause very serious damage to projects and studios if not handled properly.

----------------------------------------------------

GROUP PROS

- Doesn't need installing but can be installed just as gizmos.

- Easy to share.

- Self-contained packages so won't be dependent on any other files on the drive to work.

- Easier to debug.

GROUP CONS

-

GROUP SUMMARY

Groups are quick and efficient ways to share tools built on certain techniques.

Hope you will find it useful! 

bottom of page