Description
Fired before a frame gets rendered.
This event is installed using the XSIApplication.Advise method and can be removed using the XSIApplication.Unadvise method, please see these methods for a detailed example of installing and uninstalling events.
The event may be temporarily muted via the EventInfo.Mute property. All installed events can be viewed in the plugin manager dialog's event tab.
NOTE: The prefered and alternative method of installing this is event is as a self-installing plugin. See PluginRegistrar.RegisterEvent method for more details.
Scripting Syntax
XSIApplication.OnBeginFrame ([CustomData], [RenderType], [FileName], [Frame], [Sequence], [RenderField], [Abort])
Parameters
|
Parameter |
Type |
Description |
|
CustomData |
Variant |
Custom data passed to the event handler. This argument is optional; you can specify one when binding an event with XSIApplication.Advise. The data is passed to the event handler whenever the event is fired, an empty value is passed if no custom data is specified. |
|
RenderType |
siRenderType |
Type of render operation being performed. |
|
FileName |
String |
Output file name for the current frame; the format is as follows (refer to Render Options property page for more details): "image file name + frame number + image format" |
|
Frame |
Long |
Frame number being processed. |
|
Sequence |
Long |
Frame sequence number; this is a counter which represents the number of frames processed so far. For instance, if the rendering frames are set from 20 to 30, the sequence number would be 1 when rendering frame 20. |
|
RenderField |
siRenderFieldType |
The field rendering dominance value; can be set to odd, even or none (disabled). |
|
Abort [out] |
Boolean |
The abort feature is not implemented at this time. Note: The handler can set this argument to true for aborting this operation. |
Return Value
The abort feature is not implemented at this time. Boolean (true to abort rendering).
Examples
1. VBScript Example
' handler function for the OnBeginFrame event
sub XSIApplication_OnBeginFrame( data, rendertype, filename, frame, seq, field, abort )
logmessage "*** from XSIApplication_OnBeginFrame: ***"
logmessage "Render type: " & rendertype
logmessage "Output file name: " & filename
logmessage "Frame number: " & frame
logmessage "Sequence number: " & seq
logmessage "Render field type: " & field
end sub2. JScript Example
// handler function for the OnBeginFrame event function XSIApplication::OnBeginFrame( CustomData, RenderType, FileName, Frame, Sequence, RenderField, Unused ) { Application.LogMessage( "*** JScript Event - XSIApplication::OnBeginFrame: ***"); // your code here return 0; }
3. PerlScript Example
# handler function for the OnBeginFrame event sub XSIApplication_OnBeginFrame { my ($CustomData, $RenderType, $FileName, $Frame, $Sequence, $RenderField, $Unused) = @_; $Application->LogMessage( "*** PerlScript Event - XSIApplication_OnBeginFrame: ***" ); # your code here return 0; }
4. Python Example
# handler function for the OnBeginFrame event def XSIApplication_OnBeginFrame( CustomData, RenderType, FileName, Frame, Sequence, RenderField, Unused ): Application.LogMessage( '*** PythonScript Event - XSIApplication_OnBeginFrame: ***' ) # your code here return 0
See Also
|
PluginRegistrar.RegisterEvent |
|||
|
XSIApplication.EventInfos |
|
|
|