Legacy plug-ins expose certain functions so that Softimage can communicate with the implementation library file. These callback functions must have exactly the correct name and parameter signature in order to function properly with Softimage. This section describes the specific signatures for each supported legacy plug-in type (signatures for self-installing plug-ins are described in Callbacks for Self-Installing Plug-ins).
On Linux your functions are automatically exported from your .SO. On Windows you can use the XSIPLUGINCALLBACK macro instead of explicitly exporting them in a DEF file.
To use the XSIOnCommandCPP callback function to declare your command handler
You need to implement this function in your DLL or SO file:
XSIPLUGINCALLBACK XSI::CStatus XSIOnCommandCPP( const XSI::CString& in_name, XSI::CValueArray& in_args, XSI::CValue& out_value);
Parameter |
Description |
---|---|
in_name |
Command name. |
in_args |
Array of arguments for this specific command. |
out_value |
Return value. |
Starting with Softimage, v4.0 custom commands can be fully implemented as self-installing plug-ins which is now the recommended approach (see Custom Commands for detailed instructions on implementing self-installing command plug-ins). However, this approach (often called a v1.0 plug-in type) is still fully supported.