Page tree
Skip to end of metadata
Go to start of metadata

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.


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:

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

Unregistering the procedure

The procedure can be unregistered using the dlCallbacks command:

dlCallbacks
	-hook "AETemplateCustomContent" 
	-owner "myPlugin" 
	-removeCallback "MyAECustomContentCallback";
  • No labels
Write a comment…