Base class for user defined IK solvers.
This is the base class for writing user-defined IK solvers. Users must at least override the following methods in order to write a solver:
Users can optionally override the following methods if they want to perform work before or after doSolve is called:
Since Maya 2018, users no longer need to call the base class version of these functions if overriding them.
Note that the following virtual methods (declared in MPxNode) are irrelevant for the MPxIkSolverNode. If these methods are overridden in a class derived from MPxIkSolverNode, they will be ignored.
- compute
- getInternalValue
- setInternalValue
- legalConnection
- legalDisconnection
- connectionMade
- connectionBroken
A creator method is necessary to return an instance of the user solver:
userSolver::creator() {
return new userSolver;
}
In order to create and register the solver, execute the mel command:
Once the solver is registered it can be assigned to IK handles and its solve methods will be called in the same manner as the solvers within Maya.
|
virtual | ~MPxIkSolverNode () |
| Destructor.
|
|
virtual MPxNode::Type | type () const |
| This method returns the type of the node. More...
|
|
virtual MStatus | preSolve () |
| This method is called before doSolve. More...
|
|
virtual MStatus | doSolve () |
| This is where the main solving takes place. More...
|
|
virtual MStatus | postSolve (MStatus) |
| This method is called after doSolve has finished. More...
|
|
virtual MString | solverTypeName () const |
| This method returns the type name of the solver. More...
|
|
bool | rotatePlane (MStatus *ReturnStatus=NULL) const |
| This method indicates whether this solver supports the rotate plane. More...
|
|
MStatus | setRotatePlane (bool rotatePlane) |
| This method sets whether or not this solver supports the rotate plane. More...
|
|
bool | singleChainOnly (MStatus *ReturnStatus=NULL) const |
| This method indicates whether this solver is a single chain solver. More...
|
|
MStatus | setSingleChainOnly (bool singleChainOnly) |
| This method sets whether or not this solver is a single chain solver. More...
|
|
bool | positionOnly (MStatus *ReturnStatus=NULL) const |
| Indicates whether the ik solution is dependent on the ikHandle position only or also uses the orientation. More...
|
|
MStatus | setPositionOnly (bool positionOnly) |
| Sets whether or not the solver supports handle orientation. More...
|
|
bool | supportJointLimits (MStatus *ReturnStatus=NULL) const |
| This method indicates whether the solver supports limits on joint angles. More...
|
|
MStatus | setSupportJointLimits (bool supportJointLimits) |
| This method sets whether or not the solver supports limits on joint angles. More...
|
|
bool | uniqueSolution (MStatus *ReturnStatus=NULL) const |
| This method indicates whether the solver provides a unique solution. More...
|
|
MStatus | setUniqueSolution (bool uniqueSolution) |
| This method sets whether or not the solver provides a unique solution. More...
|
|
virtual bool | isSingleChainOnly () const |
| This method is obsolete. More...
|
|
virtual bool | isPositionOnly () const |
| This method is obsolete. More...
|
|
virtual bool | hasJointLimitSupport () const |
| This method is obsolete. More...
|
|
virtual bool | hasUniqueSolution () const |
| This method is obsolete. More...
|
|
virtual bool | groupHandlesByTopology () const |
| This method is obsolete. More...
|
|
virtual MStatus | setFuncValueTolerance (double tolerance) |
| Set the error value for this solver. More...
|
|
virtual MStatus | setMaxIterations (int value) |
| Set the maximum iterations for a solution by this solver. More...
|
|
MIkHandleGroup * | handleGroup () const |
| Returns the handle group for this solver. More...
|
|
virtual void | setHandleGroup (MIkHandleGroup *) |
| Set the handle group of this solver. More...
|
|
const MMatrix * | toWorldSpace () const |
| Returns the world space matrix for this solver. More...
|
|
const MMatrix * | toSolverSpace () const |
| Returns the local space matrix for this solver. More...
|
|
double | funcValueTolerance () const |
| Return the error value for this solver. More...
|
|
int | maxIterations () const |
| Return the the maximum nuber of itertations for a solution by this solver. More...
|
|
virtual void | snapHandle (MObject &handle) |
| This function positions the handle at the end effector position. More...
|
|
| MPxNode () |
| Constructor. More...
|
|
virtual | ~MPxNode () |
| Destructor.
|
|
virtual void | postConstructor () |
| Post constructor. More...
|
|
virtual MStatus | compute (const MPlug &, MDataBlock &) |
| This method should be overridden in user defined nodes. More...
|
|
virtual bool | getInternalValue (const MPlug &, MDataHandle &) |
| This method is overridden by nodes that store attribute data in some internal format. More...
|
|
virtual bool | setInternalValue (const MPlug &, const MDataHandle &) |
| This method is overridden by nodes that store attribute data in some internal format. More...
|
|
virtual int | internalArrayCount (const MPlug &) const |
| This method is overridden by nodes that have internal array attributes which are not stored in Maya's datablock. More...
|
|
virtual void | copyInternalData (MPxNode *) |
| This method is overridden by nodes that store attribute data in some internal format. More...
|
|
virtual MStatus | legalConnection (const MPlug &, const MPlug &, bool asSrc, bool &isLegal) const |
| This method allows you to check for legal connections being made to attributes of this node. More...
|
|
virtual MStatus | legalDisconnection (const MPlug &, const MPlug &, bool asSrc, bool &isLegal) const |
| This method allows you to check for legal disconnections being made to attributes of this node. More...
|
|
virtual MStatus | setDependentsDirty (const MPlug &plug, MPlugArray &plugArray) |
| This method can be overridden in user defined nodes to specify which plugs should be set dirty based upon an input plug {plugBeingDirtied} which Maya is marking dirty. More...
|
|
virtual MStatus | preEvaluation (const MDGContext &context, const MEvaluationNode &evaluationNode) |
| Prepare a node's internal state for threaded evaluation. More...
|
|
virtual MStatus | postEvaluation (const MDGContext &context, const MEvaluationNode &evaluationNode, PostEvaluationType evalType) |
| Clean up node's internal state after threaded evaluation. More...
|
|
virtual SchedulingType | schedulingType () const |
| When overridden this method controls the degree of parallelism supported by the node during threaded evaluation. More...
|
|
virtual MStatus | connectionMade (const MPlug &, const MPlug &, bool asSrc) |
| This method gets called when connections are made to attributes of this node. More...
|
|
virtual MStatus | connectionBroken (const MPlug &, const MPlug &, bool asSrc) |
| This method gets called when connections are broken with attributes of this node. More...
|
|
virtual MStatus | dependsOn (const MPlug &, const MPlug &, bool &depends) const |
| This method may be overridden by the user defined node. More...
|
|
virtual bool | isPassiveOutput (const MPlug &) const |
| This method may be overridden by the user defined node if it wants to provide output attributes which do not prevent value modifications to the destination attribute. More...
|
|
virtual MStatus | shouldSave (const MPlug &, bool &isSaving) |
| This method may be overridden by the user defined node. More...
|
|
virtual MPlug | passThroughToOne (const MPlug &) const |
| This method may be overridden by nodes that have a one-to-one relationship between an input attribute and a corresponding output attribute. More...
|
|
virtual bool | passThroughToMany (const MPlug &, MPlugArray &) const |
| This method is overridden by nodes that want to control the traversal behavior of some Maya search algorithms which traverse the history/future of shape nodes looking for directly related nodes. More...
|
|
virtual bool | isAbstractClass () const |
| Override this class to return true if this node is an abstract node. More...
|
|
virtual MStringArray | getFilesToArchive (bool shortName=false, bool unresolvedName=false, bool markCouldBeImageSequence=false) const |
| Use this method to return all external files used by this node. More...
|
|
virtual void | getExternalContent (MExternalContentInfoTable &table) const |
| Returns the external content (files) that this node depends on. More...
|
|
bool | addExternalContentForFileAttr (MExternalContentInfoTable &, const MObject &attr) const |
| Adds content info to the specified table from a file path attribute. More...
|
|
bool | setExternalContentForFileAttr (const MObject &attr, const MExternalContentLocationTable &) |
| Sets content info in the specified attribute from the table. More...
|
|
virtual void | setExternalContent (const MExternalContentLocationTable &) |
| Changes the location of external content in batch. More...
|
|
virtual MTypeId | typeId () const |
| Returns the TYPEID of this node. More...
|
|
virtual MString | typeName () const |
| Returns the type name of this node. More...
|
|
virtual MString | name () const |
| Returns the name of this particular instance of this class. More...
|
|
virtual MObject | thisMObject () const |
| Returns the MObject associated with this user defined node. More...
|
|
virtual MStatus | setExistWithoutInConnections (bool flag) |
| This method specifies whether or not the node can exist without input connections. More...
|
|
virtual bool | existWithoutInConnections (MStatus *ReturnStatus=NULL) const |
| Determines whether or not this node can exist without input connections. More...
|
|
virtual MStatus | setExistWithoutOutConnections (bool flag) |
| This method specifies whether or not the node can exist without output connections. More...
|
|
virtual bool | existWithoutOutConnections (MStatus *ReturnStatus=NULL) const |
| Determines whether or not this node can exist without output connections. More...
|
|
MDataBlock | _forceCache (const MDGContext &) |
| This method is obsolete. More...
|
|
virtual bool | getInternalValueInContext (const MPlug &, MDataHandle &, MDGContext &) |
| This method is obsolete. More...
|
|
virtual bool | setInternalValueInContext (const MPlug &, const MDataHandle &, MDGContext &) |
| This method is obsolete. More...
|
|
virtual int | internalArrayCount (const MPlug &, const MDGContext &) const |
| This method is obsolete. More...
|
|