Unload

Description

Unload is called when the plug-in is unloaded from the cache.

A plug-in is unloaded from the cache when a user right-clicks a plug-in in the plug-in tree and clears the Cached check. This unloads the plug-in (the .dll/.so file, or the script file) from memory, but does not "unload" the plug-in from Softimage. The Plugin and PluginItem objects still exist in Softimage, and the plug-in is still registered.

When a plug-in is not cached, it is loaded and unloaded every time a plug-in item (such as a command) is invoked. This triggers the Reload and Unload callbacks.

Softimage releases any user data stored in the context after the Unload callback returns. Softimage also releases the user data after Term returns.

Applies To

All plug-in items except Custom Properties.

Syntax

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

 

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

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

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

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

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

<plugin-item_name> is the name specified 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

Reload

XSIUnloadPlugin

Init (Command)

Init (Custom Display)

Init (Graphic Sequencer)

Init (Filter)

Init (Menu)



Autodesk Softimage v7.5