Registering Event Handlers
 
 
 

You register event handlers in XSIL:oadPlugin, which is called when Softimage loads a self-installing plug-in. XSIL:oadPlugin gets a PluginRegistrar or PluginRegistrar object from Softimage, and you use the PluginRegistrar.RegisterEvent or PluginRegistrar::RegisterEvent method to register handlers for different events.

C++ Example: Registering an event handler

XSIPLUGINCALLBACK CStatus XSILoadPlugin( PluginRegistrar& in_reg )
{
	in_reg.PutAuthor(L"Event Wizard User");
	in_reg.PutName(L"MyCppEventHandlers");
	in_reg.PutVersion(1,0);
	in_reg.RegisterEvent( L"MyOnSelectionChange", siOnSelectionChange );
	return CStatus::OK;
}