Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The extension attributes defined by a Maya plug-in can appear in the 3Delight section in the Attribute Editor. The process to achieve this is very similar to how it is usually done in Maya. Normally, Maya expects a plug-in to register a procedure that will construct the UI elements using the AETemplateCustomContent hook of the callbacks command. 3Delight for Maya allows registering that procedure with that same hook using the dlCallbacks command.

Defining the Procedure

The expected procedure signature is identical to the expectation of the similar hook of the Maya callbacks command. The procedure will receive a single string attribute set to the name of the node whose extension attributes template is being constructed.

...

Code Block
global proc MyAECustomContentCallback( string $node )
{
	// Adds a new layout for transform nodes.
	if( `nodeType $node` == "transform" )
	{
	    editorTemplate -beginLayout "My Transform Attributes";
	    // ...
	    editorTemplate -endLayout;
	}
}

Registering the procedure

Registering the procedure is done using the dlCallbacks command:

Code Block
dlCallbacks 
	-hook "AETemplateCustomContent" 
	-owner "myPlugin" 
	-addCallback "MyAECustomContentCallback";

Unregistering the procedure

The procedure can be unregistered using the dlCallbacks command:

...