Softimage でオペレータを適用するには、XSILoadPlugin で登録します。XSILoadPlugin は、Softimage で自己インストール プラグインがロードされると呼び出されます。 XSILoadPlugin は、PluginRegistrar または PluginRegistrar オブジェクトを Softimage から取得し、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;
}