StateManip function set.
The StateManip allows the user to switch between multiple states. It is drawn as a circle with a notch. Each click on the circle increments the value of the state (modulo the maximum number of states). This manipulator generates an integer value corresponding to the state of the manip.
#include <MFnStateManip.h>

Public Member Functions |
|
| virtual MFn::Type | type () const |
| Function set type. |
|
| virtual | ~MFnStateManip () |
| Destructor. |
|
| MFnStateManip () | |
| Default constructor. |
|
| MFnStateManip (MObject &object, MStatus *ReturnStatus=NULL) | |
| Constructor. |
|
| MFnStateManip (const MDagPath &object, MStatus *ret=NULL) | |
| Constructor. |
|
| MObject | create (MStatus *ReturnStatus=NULL) |
| Creates a new StateManip. |
|
| MObject | create (const MString &manipName, const MString &stateName, MStatus *ReturnStatus=NULL) |
| Creates a new StateManip. |
|
| MStatus | connectToStatePlug (MPlug &statePlug) |
| Connect to the state plug. |
|
| MStatus | setInitialState (unsigned int initialState) |
| Sets the initial state of the StateManip.
|
|
| MStatus | setMaxStates (unsigned int numStates) |
| Sets the maximum number of states that the
StateManip will have. |
|
| unsigned int | maxStates (MStatus *ReturnStatus=NULL) const |
| Returns the number of maximum states.
|
|
| unsigned int | state (MStatus *ReturnStatus=NULL) const |
| Returns the current state. |
|
| unsigned int | positionIndex (MStatus *ReturnStatus=NULL) const |
| Returns the index of the position of the
StateManip. |
|
| unsigned int | stateIndex (MStatus *ReturnStatus=NULL) const |
| Returns the index of the state. |
|
| MFnStateManip (const MObject &object, MStatus *ret=NULL) | |
| Constructor. |
|
Protected Member Functions |
|
| virtual const char * | className () const |
| Class name. |
|
| ~MFnStateManip | ( | ) | [virtual] |
Destructor.
Class destructor.
| MFnStateManip | ( | MObject & | object, |
| MStatus * | ReturnStatus =
NULL |
||
| ) |
Constructor.
Class constructor that initializes the function set to the given MObject.
| [in] | object | The MObject to attach the function set to |
| [out] | ReturnStatus | the return status |
| MFnStateManip | ( | const MDagPath & | object, |
| MStatus * | ReturnStatus =
NULL |
||
| ) |
Constructor.
Class constructor that initializes the function set to the given constant MDagPath object.
| [in] | object | The const MDagPath to attach the function set to |
| [out] | ReturnStatus | The return status |
| MFnStateManip | ( | const MObject & | object, |
| MStatus * | ReturnStatus =
NULL |
||
| ) |
Constructor.
Class constructor that initializes the function set to the given MObject.
| [in] | object | The MObject to attach the function set to |
| [out] | ReturnStatus | the return status |
| MFn::Type type | ( | ) | const [virtual] |
| const char * className | ( | ) | const [protected, virtual] |
Creates a new StateManip.
This function set's object is set to be the new manipulator.
This method should only be used to create a non-composite StateManip.
The name that appears in the feedback line is "state"
| [out] | ReturnStatus | return status |
| MObject create | ( | const MString & | manipName, |
| const MString & | stateName, | ||
| MStatus * | ReturnStatus =
NULL |
||
| ) |
Creates a new StateManip.
This function set's object is set to be the new manipulator.
This method should only be used to create a non-composite StateManip.
The name that appears in the feedback line is specified by the stateName argument.
| [in] | manipName | Name of the manip for UI purposes. |
| [in] | stateName | Label for the state value which appears in the feedback line. |
| [out] | ReturnStatus | Status code. |
Reimplemented from MFnDependencyNode.
Connect to the state plug.
The data type corresponding to the statePlug is a int integer.
| [in] | statePlug | the state plug |
| MStatus setInitialState | ( | unsigned int | initialState | ) |
Sets the initial state of the StateManip.
| [in] | initialState | initial state of the StateManip |
| MStatus setMaxStates | ( | unsigned int | numStates | ) |
Sets the maximum number of states that the StateManip will have.
The default number of maximum states is 4.
| [in] | numStates | the maxiumum number of states |
| unsigned int maxStates | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the number of maximum states.
| [out] | ReturnStatus | return status |
| unsigned int state | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the current state.
| [out] | ReturnStatus | return status |
| unsigned int positionIndex | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the index of the position of the StateManip.
The data type corresponding to this index is MFnNumericData::k3Double.
| [out] | ReturnStatus | return status |
| unsigned int stateIndex | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the index of the state.
The data type corresponding to this index is a int integer.
| [out] | ReturnStatus | return status |