class MSelectionMask

Jump to documentation

Manage what is selectable in Maya. (OpenMaya) (OpenMaya.py)

public members:

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
MSelectionMask ()
MSelectionMask ( SelectionType selType )
MSelectionMask ( const MSelectionMask & in )
virtual ~MSelectionMask ()
MStatus setMask ( SelectionType selType )
MStatus setMask ( MSelectionMask & mask )
MStatus addMask ( SelectionType selType )
bool intersects ( SelectionType selType, MStatus * ReturnStatus = NULL ) const
bool intersects ( MSelectionMask & mask, MStatus * ReturnStatus = NULL ) const
MSelectionMask operator| ( SelectionType selType )
MSelectionMask operator| ( MSelectionMask & mask )
MSelectionMask & operator = ( const MSelectionMask & other )

Documentation

Selection masks provide a way to control what is selectable in Maya.

Description

Selection masks provide a way to control what is selectable in Maya.

Selection masks can be created by OR'ing several types together, or by using the addMask method to add a selection type to an MSelectionMask.

Example - to set the object selection mask to nurbsSurfaces, nurbsCurves, cameras, and lights

    MSelectionMask mask( MSelectionMask::kSelectNurbsSurfaces );
    mask.addMask( MSelectionMask::kSelectNurbsCurves );
    mask = mask | MSelectionMask::kSelectCameras | MSelectionMask::kSelectLights;
    MGlobal::setObjectSelectionMask( mask );
	

Functions

MSelectionMask:: MSelectionMask ()

Description

Constructor. Creates an empty selection mask.

MSelectionMask:: MSelectionMask ( MSelectionMask::SelectionType selType )

Description

Constructor. Creates a selection mask of the specified type.

Arguments

  • selType the selection type of this mask

MSelectionMask:: MSelectionMask ( const MSelectionMask & in )

Description

Copy constructor. Duplicates the given mask

Arguments

  • in mask to be copied

MSelectionMask:: ~MSelectionMask ()

Description

Class destructor. Removes the selection mask.

MStatus MSelectionMask:: setMask ( MSelectionMask::SelectionType selType )

Description

Sets the selection mask to the specified selection type.

Arguments

  • selType the selection type to be set

Return Value

  • Status Code

Status Codes

  • MS::kSuccess the selection type was successfully set
  • MS::kFailure object error

MStatus MSelectionMask:: setMask ( MSelectionMask & mask )

Description

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

Arguments

  • mask the mask with the selection type to be set

Return Value

  • Status Code

Status Codes

  • MS::kSuccess the selection type was successfully set
  • MS::kFailure object error

MStatus MSelectionMask:: addMask ( MSelectionMask::SelectionType selType )

Description

Add the specified selection type to this mask.

Arguments

  • selType the selection type to add

Return Value

  • Status Code

Status Codes

  • MS::kSuccess the selection type was successfully added
  • MS::kFailure object error

bool MSelectionMask:: intersects ( MSelectionMask::SelectionType selType, MStatus * ReturnStatus ) const

Description

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

Arguments

  • selType the selection type to test
  • ReturnStatus status code

Return Value

  • true the specified selectin type is contained in this mask
  • false the specified selectin type is not in this mask

Status Codes

  • MS::kSuccess this method succeeded
  • MS::kFailure object error

bool MSelectionMask:: intersects ( MSelectionMask & mask, MStatus * ReturnStatus ) const

Description

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

Arguments

  • selType the selection mask to test
  • ReturnStatus status code

Return Value

  • true the specified selectin mask is contained in this mask
  • false the specified selectin mask is not in this mask

Status Codes

  • MS::kSuccess this method succeeded
  • MS::kFailure object error

MSelectionMask MSelectionMask:: operator| ( MSelectionMask & mask )

Description

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

Arguments

  • mask the mask containing the selection type to add

Return Value

  • The new mask

MSelectionMask MSelectionMask:: operator| ( MSelectionMask::SelectionType selType )

Description

Add the specified selection type to this mask.

Arguments

  • selType the selection type to add

Return Value

  • The new mask

MSelectionMask & MSelectionMask:: operator = ( const MSelectionMask & other )

Description

Assignment operator.

Arguments

  • other the mask to be copied

Return Value

  • A reference to the copied mask

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright