20.08.2015 Views

TECHNICAL PAPER Building Tools for Houdini 9

TECHNICAL PAPER Building Tools for Houdini 9 - Digital Cinema Arts

TECHNICAL PAPER Building Tools for Houdini 9 - Digital Cinema Arts

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.Anatomy of a ToolPython ScriptAll tools must have a Python script that defines an action such as placing a node or changing parameters onan existing node. <strong>Houdini</strong> provides a large number of Python modules in $HFS/scripts/python which will beexamined in more detail later.There are two places to define a tool interactively. The first is a Shelf Dialog, the second is as a part of anDigital Asset Op Type Properties Dialog. The dialogs themselves are almost identical, so let’s look at theShelf <strong>for</strong> an example.Shelf Edit Tool DialogChoose a Shelf Tool to examine – say “Box” from the Create Shelf.RMB on the tool icon and “Edit Tool…” to see the following dialog:The tool must have▪▪▪▪▪▪▪▪Figure 7 - Fig. 7 – Edit Tool DialogA location on Disk (Save To)A nameA labelA script (or it will do nothing and not show up in the interface)All other settings are optional, but important <strong>for</strong> good tool behavior. Let’s look at them one-by-one.Options:▪ ▪ Save To location is the name of the shelf file containing the tool.. All shelf files should be savedwithin the $HOUDINI_PATH in a toolbar folder or somewhere in the $HOUDINI_TOOLBAR_PATHif it is defined. All shelf files have to have a .shelf extension. Shelves that are not part of the <strong>Houdini</strong>distribution will typically be saved in $HOME/houdini9.0/toolbar8 | <strong>TECHNICAL</strong> <strong>PAPER</strong> Rev 1.0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!