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>
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. |
enum MFilterType |
Type of filter list.
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
[in] | name | Unique name for the filter. |
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.
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.
[out] | list | Object filter list (MSelectionList) |
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.
[in] | filterType | Filter type defined by MObjectListFilter::MFilterType. |
MObjectListFilter::MFilterType filterType | ( | ) | const |
Query the filter type.
const MString & name | ( | ) | const |
const MString & UIname | ( | ) | const |
void setUIName | ( | const MString & | name | ) |
MStatus registerFilter | ( | const MObjectListFilter & | filter | ) | [static] |
Register the object filter as one of an available set of filters.
[in] | filter | Filter to register |
MStatus deregisterFilter | ( | const MObjectListFilter & | filter | ) | [static] |
Deregister the object filter from the list of available filters.
[in] | filter | Filter to deregister |
const char * className | ( | ) | [static] |