Registering Operators

 
 
 

Before you can apply an operator in Softimage, you need to register it in XSILoadPlugin, which is called when Softimage loads a self-installing plug-in. XSILoadPlugin gets a PluginRegistrar or PluginRegistrar object from Softimage, and you use PluginRegistrar.RegisterOperator or PluginRegistrar::RegisterOperatorto register custom operators.

C++ Example: Registering a custom operator

CStatus XSILoadPlugin( PluginRegistrar& in_reg )
{
	in_reg.PutAuthor = L"Operator Wizard User";
	in_reg.PutName = L"MyNewOperatorPlugin";
	in_reg.PutVersion( 1, 0 );

	// This plug-in contains a custom operator and a custom command to apply it
	in_reg.RegisterOperator( L"MyNewOperator" );
	in_reg.RegisterCommand( L"ApplyMyNewOperator", L"ApplyMyNewOperator" );
	return true;
}

JScript Example: Registering a custom operator

function XSILoadPlugin( in_reg )
{
	in_reg.Author = "Operator Wizard User";
	in_reg.Name = "MyNewOperatorPlugin";
	in_reg.Major = 1;
	in_reg.Minor = 0;

	// This plug-in contains a custom operator and a custom command to apply it
	in_reg.RegisterOperator "MyNewOperator" );
	in_reg.RegisterCommand( "ApplyMyNewOperator", "ApplyMyNewOperator" );
	return true;
}

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License