PluginRegistrar.RegisterTimerEvent

Introduced

v5.1

Description

Registers a TimerEvent. A timer invokes an event callback at specific time intervals. You can also specify the delay time at which the event callback is called for the first time.

C# Syntax

PluginItem PluginRegistrar.RegisterTimerEvent( String in_eventName, Int32 in_interval, Int32 in_delay );

Scripting Syntax

oReturn = PluginRegistrar.RegisterTimerEvent( Name, Interval, [Delay] );

Return Value

PluginItem

Parameters

Parameter Type Description
Name String The name of the custom timer event to register. It should begin with a letter and contain only letters, numbers and the underscore character.

If a timer event name contains spaces (for example, "My Timer"), the callback function names must omit the spaces (for example, "MyTimer_Init").

Softimage expects the handler function associated to the registered event to be formatted as follows: {event name}_OnEvent.
Interval Long The interval time value in milliseconds. This value specifies the amount of time to wait between each callback invocation. If the value is 0, the event timer is stopped (muted) after the first invocation. The timer can be restarted again by un-muting the event. If the value > 0, the timer will elapse indefinitely.
Delay Long The delay value, in milliseconds, is the amount of time to wait until the callback is first invoked. By default, the delay time is 0 and the timer starts immediately.

Default Value: 0

See Also

Plugin.Items Definition Callbacks for Events