Softimage でオペレータを適用できるようにするには、まず XSILoadPlugin でオペレータを登録する必要があります。XSILoadPlugin は、Softimage で自己インストールプラグインがロードされると呼び出されます。XSILoadPlugin は Softimage から PluginRegistrar または PluginRegistrar オブジェクトを取得するため、PluginRegistrar.RegisterOperator または PluginRegistrar::RegisterOperator を使用して、カスタム オペレータを登録します。
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;
}
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;
}