OnEndSceneSave (XSIApplication)

Description

Fired after a scene save operation is performed, such as a SaveScene command.

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.OnEndSceneSave ([CustomData])

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.

Examples

1. VBScript Example

    function XSIApplication_OnEndSceneSave( CustomData )
       call Application.LogMessage( "*** VBScript Event - XSIApplication_OnEndSceneSave ***")
    end Function

2. JScript Example

    function XSIApplication::OnEndSceneSave( CustomData )
    {
       Application.LogMessage( "*** JScript Event - XSIApplication::OnEndSceneSave ***");
       // your code here
       return 0;
    }

3. PerlScript Example

    sub XSIApplication_OnEndSceneSave
    {
       my ($CustomData) = @_;
       $Application->LogMessage( "*** PerlScript Event - XSIApplication_OnEndSceneSave ***");
       # your code here
       return 0;
    }

4. Python Example

    def XSIApplication_OnEndSceneSave( data ):
       Application.LogMessage( '*** PythonScript Event - XSIApplication_OnEndSceneSave ***')
       # your code here
       return 0

5. C++ Example

    //
    // This example illustrates how to implement an event handler for the
    // OnEndSceneSave event in C++/COM.
    //
    HRESULT WINAPI XSIOnEvent
    (
       LONG        in_lEventID,
       LPVARIANT   in_pVar,
       LONG        in_lNum
    )
    {
       switch (in_lEventID)
       {
           case siOnEndSceneSave:
           {
              int ver = GetCurrentSceneVersionFromDB();
              if ( ver == 0 )
              {
                  AddCurrentSceneToDB(in_pVar[0]);
              }
           }
           break;
       };
       return S_OK;
    }

See Also

XSIApplication.OnBeginSceneSave | PluginRegistrar.RegisterEvent | XSIApplication.Advise | XSIApplication.Unadvise
XSIApplication.EventInfos |  |  |