MSelectionMask Class Reference

#include <MSelectionMask.h>

Class Description

Public Types

enum  SelectionType {
  kSelectHandles, kSelectLocalAxis, kSelectIkHandles, kSelectIkEndEffectors,
  kSelectJoints, kSelectLights, kSelectCameras, kSelectLattices,
  kSelectClusters, kSelectSculpts, kSelectNurbsCurves, kSelectNurbsSurfaces,
  kSelectMeshes, kSelectSubdiv, kSelectSketchPlanes, kSelectParticleShapes,
  kSelectEmitters, kSelectFields, kSelectSprings, kSelectRigidBodies,
  kSelectRigidConstraints, kSelectCollisionModels, kSelectXYZLocators, kSelectOrientationLocators,
  kSelectUVLocators, kSelectTextures, kSelectCurves, kSelectSurfaces,
  kSelectLocators, kSelectObjectsMask, kSelectCVs, kSelectHulls,
  kSelectEditPoints, kSelectMeshVerts, kSelectMeshEdges, kSelectMeshFreeEdges,
  kSelectMeshFaces, kSelectSubdivMeshPoints, kSelectSubdivMeshEdges, kSelectSubdivMeshFaces,
  kSelectMeshUVs, kSelectVertices, kSelectEdges, kSelectFacets,
  kSelectMeshLines, kSelectMeshComponents, kSelectCurveParmPoints, kSelectCurveKnots,
  kSelectSurfaceParmPoints, kSelectSurfaceKnots, kSelectSurfaceRange, kSelectSurfaceEdge,
  kSelectIsoparms, kSelectCurvesOnSurfaces, kSelectPPStrokes, kSelectLatticePoints,
  kSelectParticles, kSelectJointPivots, kSelectScalePivots, kSelectRotatePivots,
  kSelectPivots, kSelectSelectHandles, kSelectComponentsMask, kSelectAnimCurves,
  kSelectAnimKeyframes, kSelectAnimInTangents, kSelectAnimOutTangents, kSelectAnimMask,
  kSelectAnimAny, kSelectTemplates, kSelectManipulators, kSelectGuideLines,
  kSelectPointsForGravity, kSelectPointsOnCurvesForGravity, kSelectPointsOnSurfacesForGravity, kSelectObjectGroups,
  kSelectSubdivMeshMaps, kSelectFluids, kSelectHairSystems, kSelectFollicles,
  kSelectNCloths, kSelectNRigids, kSelectDynamicConstraints, kSelectNParticles
}
 Types of objects which can be selected. More...
 

Public Member Functions

 MSelectionMask ()
 Constructor. More...
 
 MSelectionMask (SelectionType selType)
 Constructor. More...
 
 MSelectionMask (const MString &selTypeName)
 Constructor. More...
 
 MSelectionMask (const MSelectionMask &in)
 Copy constructor. More...
 
virtual ~MSelectionMask ()
 Class destructor. More...
 
MStatus setMask (SelectionType selType)
 Sets the selection mask to the specified selection type. More...
 
MStatus setMask (MSelectionMask &mask)
 Sets the selection type for this mask to the selection type of the specified mask. More...
 
MStatus addMask (SelectionType selType)
 Add the specified selection type to this mask. More...
 
bool intersects (SelectionType selType, MStatus *ReturnStatus=NULL) const
 Returns true if the specified selection type is contained within this selection mask. More...
 
bool intersects (MSelectionMask &mask, MStatus *ReturnStatus=NULL) const
 Returns true if the specified selection mask is contained within this selection mask. More...
 
MSelectionMask operator| (SelectionType selType)
 Add the specified selection type to this mask. More...
 
MSelectionMask operator| (MSelectionMask &mask)
 Add the selection type of the specified mask to this mask. More...
 
MSelectionMaskoperator= (const MSelectionMask &other)
 Assignment operator. More...
 

Static Public Member Functions

static bool registerSelectionType (const MString &selTypeName, int priority=0)
 Registers a new selection type. More...
 
static bool deregisterSelectionType (const MString &selTypeName)
 Unregisters a previously registered selection type. More...
 
static int getSelectionTypePriority (const MString &selTypeName)
 Gets the selection priority corresponding to a given selection type. More...
 

Member Enumeration Documentation

Types of objects which can be selected.

Enumerator
kSelectHandles 

 

kSelectLocalAxis 

 

kSelectIkHandles 

 

kSelectIkEndEffectors 

 

kSelectJoints 

 

kSelectLights 

 

kSelectCameras 

 

kSelectLattices 

 

kSelectClusters 

 

kSelectSculpts 

 

kSelectNurbsCurves 

 

kSelectNurbsSurfaces 

 

kSelectMeshes 

 

kSelectSubdiv 

 

kSelectSketchPlanes 

 

kSelectParticleShapes 

 

kSelectEmitters 

 

kSelectFields 

 

kSelectSprings 

 

kSelectRigidBodies 

 

kSelectRigidConstraints 

 

kSelectCollisionModels 

 

kSelectXYZLocators 

 

kSelectOrientationLocators 

 

kSelectUVLocators 

 

kSelectTextures 

 

kSelectCurves 

 

kSelectSurfaces 

 

kSelectLocators 

 

kSelectObjectsMask 

 

kSelectCVs 

 

kSelectHulls 

 

kSelectEditPoints 

 

kSelectMeshVerts 

 

kSelectMeshEdges 

 

kSelectMeshFreeEdges 

 

kSelectMeshFaces 

 

kSelectSubdivMeshPoints 

 

kSelectSubdivMeshEdges 

 

kSelectSubdivMeshFaces 

 

kSelectMeshUVs 

 

kSelectVertices 

 

kSelectEdges 

 

kSelectFacets 

 

kSelectMeshLines 

 

kSelectMeshComponents 

 

kSelectCurveParmPoints 

 

kSelectCurveKnots 

 

kSelectSurfaceParmPoints 

 

kSelectSurfaceKnots 

 

kSelectSurfaceRange 

 

kSelectSurfaceEdge 

 

kSelectIsoparms 

 

kSelectCurvesOnSurfaces 

 

kSelectPPStrokes 

 

kSelectLatticePoints 

 

kSelectParticles 

 

kSelectJointPivots 

 

kSelectScalePivots 

 

kSelectRotatePivots 

 

kSelectPivots 

 

kSelectSelectHandles 

 

kSelectComponentsMask 

 

kSelectAnimCurves 

 

kSelectAnimKeyframes 

 

kSelectAnimInTangents 

 

kSelectAnimOutTangents 

 

kSelectAnimMask 

 

kSelectAnimAny 

 

kSelectTemplates 

 

kSelectManipulators 

 

kSelectGuideLines 

 

kSelectPointsForGravity 

 

kSelectPointsOnCurvesForGravity 

 

kSelectPointsOnSurfacesForGravity 

 

kSelectObjectGroups 

 

kSelectSubdivMeshMaps 

 

kSelectFluids 

 

kSelectHairSystems 

 

kSelectFollicles 

 

kSelectNCloths 

 

kSelectNRigids 

 

kSelectDynamicConstraints 

 

kSelectNParticles 

 

Constructor & Destructor Documentation

OPENMAYA_MAJOR_NAMESPACE_OPEN MSelectionMask ( )

Constructor.

Creates an empty selection mask.

Constructor.

Creates a selection mask of the specified type.

Parameters
[in]selTypethe selection type of this mask
MSelectionMask ( const MString selTypeName)

Constructor.

Creates a selection mask of the specified type.

Parameters
[in]selTypeNamename of the selection type
MSelectionMask ( const MSelectionMask in)

Copy constructor.

Duplicates the given mask

Parameters
[in]inmask to be copied
~MSelectionMask ( )
virtual

Class destructor.

Removes the selection mask.

Member Function Documentation

MStatus setMask ( MSelectionMask::SelectionType  selType)

Sets the selection mask to the specified selection type.

Parameters
[in]selTypethe selection type to be set
Returns
  • MS::kSuccess the selection type was successfully set
  • MS::kFailure object error
+ Examples:
MStatus setMask ( MSelectionMask mask)

Sets the selection type for this mask to the selection type of the specified mask.

Parameters
[in]maskthe mask with the selection type to be set
Returns
  • MS::kSuccess the selection type was successfully set
  • MS::kFailure object error
MStatus addMask ( MSelectionMask::SelectionType  selType)

Add the specified selection type to this mask.

Parameters
[in]selTypethe selection type to add
Returns
  • MS::kSuccess the selection type was successfully added
  • MS::kFailure object error
+ Examples:
bool intersects ( MSelectionMask::SelectionType  selType,
MStatus ReturnStatus = NULL 
) const

Returns true if the specified selection type is contained within this selection mask.

Parameters
[in]selTypethe selection type to test
[out]ReturnStatusstatus code
Returns
  • true the specified selection type is contained in this mask
  • false the specified selection type is not in this mask
Status Codes:
  • MS::kSuccess this method succeeded
  • MS::kFailure object error
+ Examples:
bool intersects ( MSelectionMask mask,
MStatus ReturnStatus = NULL 
) const

Returns true if the specified selection mask is contained within this selection mask.

Parameters
[in]maskthe selection mask to test
[out]ReturnStatusstatus code
Returns
  • true the specified selection mask is contained in this mask
  • false the specified selection mask is not in this mask
Status Codes:
  • MS::kSuccess this method succeeded
  • MS::kFailure object error

Add the specified selection type to this mask.

Parameters
[in]selTypethe selection type to add
Returns
The new mask
MSelectionMask operator| ( MSelectionMask mask)

Add the selection type of the specified mask to this mask.

Parameters
[in]maskthe mask containing the selection type to add
Returns
The new mask
MSelectionMask & operator= ( const MSelectionMask other)

Assignment operator.

Parameters
[in]otherthe mask to be copied
Returns
A reference to the copied mask
bool registerSelectionType ( const MString selTypeName,
int  priority = 0 
)
static

Registers a new selection type.

It is perfectly legal for 2 plug-ins to register the same selection type. Currently we use the registration count. The selection type is deleted only when deregisterSelectionType() as been called the same number of times as this function - registerSelectionType().

When registerSelectionType() is invoked and the selection type already exists,we neither enable it nor change its priority, just add its registration count by 1. The reason is the user might has modified these values after loading the plug-in that has register the selection type the first time.

Parameters
[in]selTypeNameName of the selection type.
[in]priorityPriority of the selection type,see 'selectPriority' command.
Returns
  • true The selection type was successfully registered.
  • false Failed to register the selection type.
+ Examples:
bool deregisterSelectionType ( const MString selTypeName)
static

Unregisters a previously registered selection type.

Parameters
[in]selTypeNameName of the selection type.
Returns
  • true The selection type was successfully unregistered.
  • false Failed to unregister the selection type.
+ Examples:
int getSelectionTypePriority ( const MString selTypeName)
static

Gets the selection priority corresponding to a given selection type.

Parameters
[in]selTypeNameName of the selection type.
Returns
The selection priority corresponding to a given selection type. return -1 if there is no select type named selTypeName.
+ Examples:

The documentation for this class was generated from the following files:
  • MSelectionMask.h
  • MSelectionMask.cpp