Saturday, 15 December 2007

Creating shortcuts in SilhouetteFX Roto/Paint for viewing RGB channels

One of the most highly missed keyboard shortcuts for Silhouette are shortcuts for viewing the RGB channels seperately.
In Silhouette all your keyboard shortcuts are defined in a python script called that can be found in the scripts folder in the install directory.
Editing a python script might scare off some users at first but editing the is surprisingly easy and fun and above all flexible
as it let's you add your own keyboard shortcut functions.
Even if you don't know Python you should be able to do basic customization of your shortcuts after a few minutes.

To create shortcuts for viewing the RGB channels you have to create your own little functions which you then assign certain keyboard shortcuts.
Here's the code i've added to the end of my

# shortcuts for viewing colourchannels seperately

def viewR():
fx.viewer.setChannelMask(fx.Color(1, 0, 0, 0))

def viewG():
fx.viewer.setChannelMask(fx.Color(0, 1, 0, 0))

def viewB():
fx.viewer.setChannelMask(fx.Color(0, 0, 1, 0))

def viewRGB():
fx.viewer.setChannelMask(fx.Color(1, 1, 1, 0))

fx.bind('6', viewR)
fx.bind('7', viewG)
fx.bind('8', viewB)
fx.bind('9', viewRGB)

Quite simple and self explanatory.
By pressing 6,7,8,9 on my keyboard i can now switch between the colour channels and the full RGB view. Alternatively writing a "toggle" function to view the channels is also not that complex.
What use has that you ask? Well it's nice to view the channels seperately to decide which is best for tracking or to check if you might be able to
pull a key on one of the colour channels for some areas instead of doing roto.
Also for doing paint it's sometimes very important to check the colour channels seperately (e.g. when doing marker removals on bluescreens).

Have fun!

After figuring out how to create these functions i found out that John-Michael Bills had already written about these on the SilhouetteFX forums.
But i post it again here for all people that aren't registered at their forums.

No comments: