Share

Pins

Pins are helper transforms that act as guides for defining the pivot matrices of controls and joints within a module’s user_setup sub-compound.

Pins are initially stored on the module’s inputs port and are authored at the module's interface level before being exposed to the host application.

Each pin consists of:

  • A name (string)
  • A pivot matrix (Math::double4x4)

While the name is optional, it is strongly recommended to provide one. Named pins can be easily queried using the dedicated find_pin or find_all_pins utility nodes.

Setting Default Pins

Setting default pins is essential to create functional modules.

When the module’s inputs port is unconnected, you can define default pins directly using the array widget in the Parameter Editor.

  • Use the plus (1) button to add a new element to the pins array.
  • Use the trash (2) button to remove an existing element from the pins array.

editing pins in the Parameter Editor

The values you set there will serve as the module’s default pins definitions and will be used to create the corresponding pin objects when the rig is generated in the host application.

After exposing the inputs port to the host application, the pin values will be fully driven from there.

Note that you can also set your default pins on a module's inputs port through scripting using the vnnNode command. In the example bellow, we set two pins named first and second, each set to an identity matrix.

cmds.vnnNode("bifrostGraphShape1", "/template_module", setPortDefaultValues=("inputs", "{{first, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, second, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}, , {}, {}, {}, {}, {}, {}, , 0, 0}"))

Visualizing Pins

If a rig has not been created yet and there are no objects in the host application driving them, pins can still be visualized for debugging.

To view pins in the viewport:

  1. Activate the module’s D (Diagnostics) terminal flag.
  2. Enable Display Pins in the module’s Parameter Editor, under the Diagnostics port group.

Pins appear as red dots in the viewport and if you enable Display Transforms, their axes drawn as well.

visualizing pins

Was this information helpful?