Using Textmate 2 with Houdini

Houdini allows you to specify an external editor to use when editing VEX code (such as from the point wrangle SOP). By default, on OSX, the external app is the basic text editor, which is pretty barebones and had a tendency to crash. A far better solution would be to use the pretty sweet Textmate 2 editor, which you can download free from here. Setting Houdini to use Textmate is a relatively straightforward process:

  1. Firstly, in Textmate, go to Preferences > Terminal and check that Shell Support turned on.
  2. Next edit your hconfig.env file. This is located in the following directory (replacing the X.X with your Houdini version):

~/Library/Preferences/houdini/X.X/houdini.env

Then simply append the following text to the file:

VISUAL = /usr/local/bin/mate -w

When you next launch Houdini and edit VEX code it should now get sent over to Textmate for editing.

Tip: Find Bad Geo

Find those pesky non-quads using a group node.

 

Simply group by expression:

 

$NVTX!=4

 

So any geometry that does not have four verts will grouped.

 

I discovered this ages ago, forgot  and just rediscovered it and shall save it here for posterity as I’m so going to forget it again :-)

 

Fnirg

Some Useful Bits and Pieces

Have been pretty busy with work of late, hence the total lack of updates. Hopefully will get around to updating with some more interesting stuff soon, but in the meantime, and to prove this blog is not quite dead yet, here are some miscellaneous bits and pieces that I???ve found useful. If you???ve been using Houdini a while you probably know most of these, but hopefully there’ll be something useful you haven’t come across before. Feel free to share anything you think useful in the comments below.

Misc Shortcuts

  • Pressing the r key swaps the inputs of a selected node in the Network Pane. For ages I???ve wanted something like the shift+x shortcut in Nuke and it was there all along.
  • Pressing Ctrl when you click on the jump to operator button (e.g. next to the path on the object merge node, the parameters for the referenced node will pop up in a floating parameter window.
  • The alt+left and alt+right keys cycle forward and backward in the Network Pane.
  • The backtick key allows you to remake a selection. So for example if you have beveled some edges using the poly bevel sop, but then want to add some edges to the selection, you can simply select the poly bevel node and in the viewport press the backtick key, select some more edges and then press enter. If you look in the network pane you can see that it disconnects the node temporarily and then reconnects it when done.
  • In the network pane alt+lmb clicking on a node automatically picks up that nodes output and then lmb on the node you want to connect it to it???s input. This allows you to connect nodes when zoomed out a fair bit in the network pane.

Useful Expressions

opinfo

This allows you to print the full output of a node (that is what you see when you mmb on a node). This is handy if you have a lot of attributes on a node and it???s erroring out and you cant see the error message, or if you want to see the complete syntax of an L-System or the node has a really long comment. The syntax is:

opinfo -v <*path to node*>

So for example:

opinfo -v /obj/lsystem1

echo

You can use the echo command to return the output of an expression in the textport. Simply enclose the command that you want to evaluate in backticks. For example:

echo `point("/obj/node/ref", $PT, "Cd", 2)`

This can be handy to see if your expression is returning the value that you think it should be.

op:

Recently discovered this while watching the HOM Masterclass.

So if you have a digital asset and you want to promote the parameters from one the contained nodes. You can do it two ways: either manually construct the interface you want by dragging the parameters from the node onto the parameters pane in the Type Properties dialogue, which is tedious or use the awesome op: command to grab the parameters from the node.

So to do this create edit the parameter interface for the asset and:

  1. Create a folder parameter on your node.
  2. On the options for the folder turn Import Settings on.
  3. Source is the name of the node.
  4. Token is the folder that you want to import.
  5. Mask is the parameters you want to import.
  6. Having entered the information you want to get you???ll need to refresh the folder to import the settings. Simply right click on the folder icon in the parameter list and choose ???Refresh Imports??? to update the parameters.

So if we wanted to import the translate and rotate parameters from a regular transform node. The settings would look like this:

  • Source: op: xform1
  • Token:
  • Mask : t r

Apart from allowing you to grab existing parms and promote them, this is a relatively elegant way of connecting assets together, particularly since it preserves the layout of the parameters.