Go to: Synopsis. Flags. Return value. Related. MEL examples.
cpGetSolverAttr [-attribute string] [-help] [-index]
cpGetSolverAttr is undoable, queryable, and editable.
This command is used to extract values from a cloth solver
node. This command can only be used when the solver is
computing the cloth mesh. During playback, or whenever the solver
is using a cache to obtain information for the
current frame, the values from cpGetSolverAttr will not be valid.
attribute, help, index
| Long name (short name) |
[argument types] |
Properties |
-help(-h)
|
|
|
|
Prints a quick help message, including a list of all attributes
for the -a/attribute flag.
|
|
-attribute(-a)
|
string
|
|
|
Specifies which attribute to set
In query mode, this flag needs a value.
|
|
-index(-idx)
|
|
|
|
Specifies the which control point is being set, optional.
In query mode, this flag needs a value.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can be used more than once in a command
|
Varies, depending on values requested.
cpSetSolverAttr
// Query the position of the CV with index 5.
cpGetSolverAttr -a position -idx 5 "cloth1";
// Query the velocities off all CVs.
cpGetSolverAttr -a velocity "cloth1";
// Query the positions of all the CVs, then set them
float $p[] = `cpGetSolverAttr -a p "cloth1"`;
// ... modify positions
cpSetSolverAttr -a p $p "cloth1";
Return to Autodesk Index