Before you can apply an operator in XSI, you need to register it in XSILoadPlugin, which is called when XSI loads a self-installing plug-in. XSILoadPlugin gets a PluginRegistrar object from XSI, and you use PluginRegistrar.RegisterOperator to 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;
}SOFTIMAGE|XSI v7.0