zooTriggered: walk-through (1)

david | | Tuesday, November 6th, 2007

shelfIconUI.jpg The zooTriggered tool is well documented via it's own Help menu. Here is an extract

Overview
------
zooTriggered has two major functions. Firstly, it allows you to create "trigger" objects in your scene, and secondly, it lets you add custom menus to an object's right click menu.

A trigger object is an object that "does something" when selected. What the trigger does can be absolutely anything, as it just runs a piece of mel script contained on the object. You can think of these trigger objects as buttons, as they do something when you "press" (ie select) them.

In part 1 of this walk-through I am going to demonstrate how to set up a simple trigger object. For the demonstration I have created the joints for my character's left hand and nurbs sphere called fingers_L_Controller. The idea is to set up the sphere as a trigger which will select all the finger joints on the left hand when I click it.

Start by loading the user interface by typing

zooTriggered;

in the MEL command window. As usual you could put this command on your shelf. (You may wish to download the blue button icon that I use.)

zooTriggeredUI_01.jpg

zooTriggered works in two different modes. For part 1 of this walk-through I am using edit zooTriggered command mode. You set this in the View menu as shown in the next picture

zooTriggeredUI_02.jpg

Setting up the trigger is as simple as 1,2,3...

1. Select the trigger object - fingers_L_Controller - and right-click in the panel on the top left side of the interface. Choose add select scene objects to list as shown in the next picture

zooTriggeredUI_03.jpg

2. Select all the finger joints and right-click in the top right pannel of the interface and choose add selected to connects from the drop-down menu as shown in the next picture

zooTriggeredUI_04.jpg

zooTriggeredUI_05.jpg

3. Right click in the lower pannel of the interface and choose select targets preset from the drop-down menu as shown in the next picture

zooTriggeredUI_06.jpg

Some commands are added to the zooTriggered command string and the interface looks like this

zooTriggeredUI_07.jpg

The trigger has been created.

However if you click on the fingers_L_Controller sphere in the viewport it will still select the sphere. The trigger is not enabled and the load status indicator is grey.

To enable the trigger you need to click the load button near the top of the user interface. Notice how the load status indicator turns bright green

zooTriggeredUI_08.jpg

Now if you click on the fingers_L_Controller sphere in the viewport the 4 finger joints will be selected.

This has been a very simple demonstration of zooTriggered. Once you get to know how to program the zooTriggered command string you can create sophisticated rigs that give the animator simple viewport based controls.

Just to finish off you should also consider installing the shelf button for loading and unloading the triggers.

zooTriggeredUI_10.jpg

This will add a button to your shelf which is either grey or green depending on the load status

shelfIconsUnloaded.jpg

shelfIconsLoaded.jpg

The blue button shown here is the one I use to load the setup user interface, but once I have created the triggers I just use the 2nd shelf button to toggle the trigger load status.

To get the shelf button to show the correct status when maya is first opened you need to add two lines to userSetup.mel

source zooTriggered.mel;
zooTrigUpdateUIState;

Now that you have seen how it works, remember that I have barely scratched the surface of what is possible with this tool. There is a lot more you can learn by reading the help text in the zooTriggered help menus.

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress | Based on a theme by Roy Tanck