Description
Called by Softimage to load a plug-in.
XSILoadPlugin registers plug-in items (such as commands, properties, and menus) and sets plug-in properties (such as the href="xsidevref,PluginRegistrar_Major,PluginRegistrar.Major;xsidevref,PluginRegistrar_Minor,PluginRegistrar.Minor;sicppsdk,PluginRegistrar#PutVersion,PluginRegistrar::PutVersion" type="mixed">version number, the author's name, email address, and the location of the help file).
Applies To
All plug-ins.
Syntax
// C#
public class <class_name>
{
public bool LoadPlugin( PluginRegistrar in_reg )
{
...
}
}
// C++ CStatus XSILoadPlugin( PluginRegistrar& in_reg ) { ... } // JScript function XSILoadPlugin( in_reg ) { ... } # Python def XSILoadPlugin( in_context ): ... ' VBScript Function XSILoadPlugin( in_reg ) ... End Function # PerlScript sub XSILoadPlugin { my $in_context = shift; }
Parameters
|
Parameter |
Language |
Type |
Description |
|
in_reg |
Scripting and C# |
The object used to register plug-in items and set plug-in properties. |
|
|
C++ |
Examples
JScript example
function XSILoadPlugin( in_reg )
{
in_reg.Author = "sblair";
in_reg.Name = "My_CommandPlugin";
in_reg.Email = "";
in_reg.URL = "";
in_reg.Major = 1;
in_reg.Minor = 0;
in_reg.RegisterCommand("My_Command","My_Command");
in_reg.RegisterMenu(siMenuTbGetPropertyID,"My_Command_Menu",false,false);
//RegistrationInsertionPoint - do not remove this line
return true;
}C++ example
XSIPLUGINCALLBACK XSI::CStatus XSILoadPlugin( XSI::PluginRegistrar& in_reg )
{
in_reg.PutAuthor( L"Softimage" );
in_reg.PutName( L"VertexColors SDKExample" );
in_reg.PutVersion( 1, 0 );
in_reg.RegisterCustomDisplay( L"VertexColorsSDKExample" );
return XSI::CStatus::OK;
}Python example
import win32com.client
from win32com.client import constants
null = None
false = 0
true = 1
def XSILoadPlugin( in_reg ):
in_reg.Author = "sblair"
in_reg.Name = "MyPythonCommandPlugin"
in_reg.Email = ""
in_reg.URL = ""
in_reg.Major = 1
in_reg.Minor = 0
in_reg.RegisterCommand("MyPythonCommand","MyPythonCommand")
in_reg.RegisterMenu(constants.siMenuMainHelpID,"MyPythonCommand_Menu",false,false)
#RegistrationInsertionPoint - do not remove this line
return trueSee Also
• RegisterCommand
• RegisterConverterEvent
• RegisterEvent
• RegisterFilter
• RegisterMenu
• RegisterOperator
• RegisterProperty
• RegisterTimerEvent
Autodesk Softimage v7.5