Description
Match determines whether an element (such as a 3D object, or an edge, point, or polygon) matches the filter requirements. XSI uses the Match callback to filter selections in 3D views and the schematic. For subcomponent filters, however, XSI will use Subset, if it exists, instead of Match to filter the selection.
Match returns True to keep an element, and False to filter the element out.
You can implement a custom filter by writing a single callback: the Match callback. All filters must implement Match, and can optionally implement two additional callbacks: Subset and IsApplicable.
Applies To
Syntax
// C#
public class <filter_name>
{
public bool Match( Context in_ctxt )
{
...
}
}
// C++
bool <filter_name>_Match( CRef& in_context
{
...
} )
// JScript
function <filter_name>_Match( in_context )
{
...
}
' VBScript
Function <filter_name>_Match( in_context )
...
End Function
# Python
def <filter_name>_Match( in_context ):
...
# PerlScript
sub <filter_name>_Match
{
my $in_context = shift;
}
<filter_name> is the name specified in the call to RegisterFilter, with any spaces removed.
Parameters
|
Parameter |
Language |
Type |
Description |
|
in_context |
Scripting and C# |
Context.Source returns the Filter. |
|
|
C++ |
CRef & |
A reference to the Context object. |
|
Attribute |
Description |
|
Input |
The elements to filter. For a 3D object filter, the input is a 3D object. |
See Also
• Subset
SOFTIMAGE|XSI v6.01