Matter

This is a RotoPaint Gizmo, designed for one simple purpose.. removing and adding to a matte. (0, or 1).

Updated: 13 August 2010

Author: ant

Compatible Nuke versions: 6.1 or later

Compatibility: Linux, Mac, Windows

This is my first attempt at creating a custom RotoPaint gizmo. When working on a difficult key, I was scrubbing through frames and constantly switching between a zero alpha, and full alpha brush setting, to add or remove stuff from the alpha channel. This Gizmo simple allows you to paint out or paint in bits of your alpha channel, 'zero' or 'one'. 

A keyboard shortcut can be used to switch between remove mode (Alt+Shift+Q) or add mode (Alt+Shift+A).

There is visual feedback when in Remove/Add mode, through the colour of the brush overlay.

Any suggestions for improvements are most welcome!

Usage: Copy to your .nuke folder or Plugin Path.

If you want to add a Menu item on startup, add this to your menu.py:

# Custom Menu Layouts

mbar=nuke.menu("Nuke")

 

def toggleMatterMode(arg):

  if arg==0:

    for n in nuke.allNodes('Matter'):

      n['remove_alpha'].execute()

  else:

    for n in nuke.allNodes('Matter'):

    n['add_alpha'].execute()

 

# Matter Menu

m = mbar.addMenu("&Matter")

m.addCommand("Matter Gizmo", "nuke.tcl('Matter')", "#+p")

m.addCommand("Remove Matte", "toggleMatterMode(0)", "#+q")

m.addCommand("Add Matte", "toggleMatterMode(1)", "#+a")

Sign in or register to download or rate.