Match

Description

Match determines whether an element (such as a 3D object, or an edge, point, or polygon) matches the filter requirements. Softimage uses the Match callback to filter selections in 3D views and the schematic. For subcomponent filters, however, Softimage 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

Custom Filters

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 PluginRegistrar.RegisterFilter, with any spaces removed.

Parameters

Parameter

Language

Type

Description

in_context

Scripting and C#

Context

Context.Source returns the Filter.

C++

CRef &

A reference to the Context object.

Context Attributes

Attribute

Description

Input

The elements to filter. For a 3D object filter, the input is a 3D object.

See Also

Init (Filter)

IsApplicable

Subset

Filter Callbacks



Autodesk Softimage v7.5