Public Types | Public Member Functions | Static Public Member Functions

MObjectListFilter Class Reference

Search for all occurrences

Detailed Description

Class for defining a scene list filter.

MObjectListFilter provides an interface to define a list of selection items which can be used to filter the display of items for interactive 3D scene rendering.

The selection list can either have the meaning of rendering only the items in that list (an inclusion list) or only rendering items which are not in the list (an exclusion list).

Programmers using this interface can derive from this class and implement the required methods. The derived class is responsible for

#include <MObjectListFilter.h>

List of all members.

Public Types

enum   MFilterType { kInclusionList = 0, kExclusionList, kNumberOfFilterTypes }
 

Type of filter list.

More...

Public Member Functions

  MObjectListFilter (const MString &name)
  Constructor for a filter.
virtual  ~MObjectListFilter ()
  Default destructor.
virtual bool  requireListUpdate ()=0
  This method is called by Maya to determine whether the contents of the object list for the filter has changed since the last requireLastUpdate() call was made.
virtual MStatus  getList (MSelectionList &list)=0
  This method will return the selection list to use for filtering scene rendering.
void  setFilterType (MFilterType filterType)
  Set the filter type.
MFilterType  filterType () const
  Query the filter type.
const MString name () const
  Query the name identifier.
const MString UIname () const
  Query the UI name.
void  setUIName (const MString &name)
  Set the UI name.

Static Public Member Functions

static MStatus  registerFilter (const MObjectListFilter &filter)
  Register the object filter as one of an available set of filters.
static MStatus  deregisterFilter (const MObjectListFilter &filter)
  Deregister the object filter from the list of available filters.
static const char *  className ()
  Returns the name of this class.

Member Enumeration Documentation

Type of filter list.

Enumerator:
kInclusionList 

Include only items on the list.

kExclusionList 

Exclude only items on the list.

kNumberOfFilterTypes 

Not to be used. This is the number of filter types.


Constructor & Destructor Documentation

MObjectListFilter ( const MString name )

Constructor for a filter.

By default the instance is created with the type kInclusionList (an inclusion list). And the UI name is set to be the input name parameter

Parameters:
[in] name Unique name for the filter.

Member Function Documentation

bool requireListUpdate ( ) [pure virtual]

This method is called by Maya to determine whether the contents of the object list for the filter has changed since the last requireLastUpdate() call was made.

If the list has changed then getList() will be called to query for the contents of the filter.

This method will be called once per frame render or refresh if the filter is actively being used for rendering.

Users should never call this method themselves.

Derived classes must implement this method.

Returns:
true If the object list for the filter has changed.
MStatus getList ( MSelectionList list ) [pure virtual]

This method will return the selection list to use for filtering scene rendering.

Currently filtering at the component level is not supported. Any components specified for selection items in the list will be ignored.

This method will be called when an update is indicated (by returning true from requireListUpdate()).

Derived classes must implement this method.

Parameters:
[out] list Object filter list (MSelectionList)
Returns:
Status code
Status Codes:
void setFilterType ( MObjectListFilter::MFilterType  filterType )

Set the filter type.

This is a convenience method for the user. This method will never be called by Maya.

Parameters:
[in] filterType Filter type defined by MObjectListFilter::MFilterType.
MObjectListFilter::MFilterType filterType ( ) const

Query the filter type.

Returns:
Filter type (MObjectListFilter::MFilterType)
const MString & name ( ) const

Query the name identifier.

Returns:
Name identifier
const MString & UIname ( ) const

Query the UI name.

Returns:
UI name
void setUIName ( const MString name )

Set the UI name.

Parameters:
[in] name UI name
MStatus registerFilter ( const MObjectListFilter filter ) [static]

Register the object filter as one of an available set of filters.

Parameters:
[in] filter Filter to register
Returns:
Status code
Status Codes:
MStatus deregisterFilter ( const MObjectListFilter filter ) [static]

Deregister the object filter from the list of available filters.

Parameters:
[in] filter Filter to deregister
Returns:
Status code
Status Codes:
const char * className ( ) [static]

Returns the name of this class.

Returns:
Name of this class.

MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter
MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter MObjectListFilter