Term

Description

Use this callback to free memory allocated in the Init callback or perform other cleanup functions (typically used for C++ plug-ins). Generally, this callback is fired aft fired when a plug-in is removed from Softimage (just before Softimage calls XSIUnloadPlugin). For example, Term is triggered when you exit Softimage or unload the plug-in (either from the Plug-in Manager or by calling UnloadPlugin).

However, there are some variations, depending on the type of plug-in item.

Plug-in Item | Description
Property | Fired when a property is deleted.
Menu | Term is fired only if Init was fired at some point. If the menu was never opened, then Init was never fired and Term has nothing to do.

Syntax

    // C#
    public class <plugin-item_name>
    {
       public bool Term( Context in_ctxt )
       {
           ...
       }
    }

    // C++
    CStatus <plugin-item_name>_Term( CRef& in_context )
    {
       ...
    }

    // JScript
    function <plugin-item_name>_Term( in_context )
    {
       ...
    }

    # Python
    def <plugin-item_name>_Term( in_context ):
       ...

    ' VBScript
    Function <plugin-item_name>_Term( in_context )
       ...
    End Function

    # PerlScript
    sub <plugin-item_name>_Term
    {
       my $in_context = shift;
    }

<plugin-item_name> is the name used to register the plug-in item in XSILoadPlugin, with any spaces removed.

Parameters

Parameter | Language | Type | Description
in_context | Scripting and C# | Context | Context.Source returns the plug-in item.
C++ | CRef & | A reference to the Context object.

See Also

• Unload

Autodesk Softimage v7.5