Operator Callbacks

Callback

Description

Define

Fired when a operator is applied to an object (for example, using ProjectItem.AddCustomOp or Parameter.AddCustomOp). This is where you add custom parameters to the operator.

DefineLayout

Fired when the property page is first displayed. This is where you define the layout of UI controls on the property page for the operator’s parameters.

Init (Operator)

Fired when an instance of the operator is instantiated. Unlike Define, Init is called both for newly created operators and for operators loaded from persistence. This is where you initialize cached operator data.

OnInit

Fired each time the property page is displayed (e.g., each time the property is inspected with InspectObj()). Allows you to set the initial values of the UI controls.

OnChanged

Fired each time a UI control changes value.

OnClicked

Fired when a command button is clicked.

OnClosed

Fired when the property page is closed via the Close button or the keyboard shortcut.

OnTab

Fired when a user clicks a tab.

PPGEvent

C++ and C# callback for all property page events (OnInit, OnChanged, OnClicked, OnClosed, and OnTab).

Term

Fired when an operator is deleted. This is where you clean user data.

Unload, Reload

Fired when the plug-in is cached (reloaded) and uncached (unloaded). By default, all plug-ins are cached, but users can remove a plug-in from the cache (by right-clicking a plug-in in the plug-in tree and clearing the Cached checkmark).

Update

Fired whenever an operator is expected to evaluate itself. This is the most important callback, called whenever an operator is expected to evaluate itself.

Note: If there are multiple outputs the Update function is called once per output port.



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index