Node Creation User Callbacks

Golaem provides a MEL callback functions mechanism which is triggered every time a new Golaem node is created. They can be used to edit default node parameters or call custom pipeline code. Those callbacks all share the same prototype:

global proc [creationFunctionName]UserCallback(string $nodeName);

The following functions are available for a callback to be implemented. When implemented and sourced in the Maya session, they will be called when the corresponding node is created via the Golaem Shelf or the Golaem Menus:

addCrowdBehavior // whenever a new behavior is created
addCrowdBe[BehaviorName]
addCrowdField
addTerrainLocator
addPerceptionLocator
addPhysicsLocator
addFlockLocator
addTrafficLocator
addTheCharacterMakerLocator
addCrowdEntityTypeNode
addCrowdGroupEntityTypeNode
addSensorLocator
glmPopToolHandleConnections

Here is an example of an implemented callback called whenever a new Motion Behavior is created:

global proc addCrowdBeMotionUserCallback(string $nodeName)
{
  setAttr ($nodeName + ".loop") 0; // disable looping by default
}