Go to: Return value. Related commands. Flags. Examples.

Synopsis

cpGetSolverAttr [flags]

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.

Return value

Varies, depending on values requested.

Related commands

cpSetSolverAttr

Flags

attribute, help, index

Long name (short name)[argument types]Properties
-help (-h) create
Prints a quick help message, including a list of all attributes for the -a/attribute flag.
-attribute (-a) stringquery
Specifies which attribute to set
-index (-idx) query
Specifies the which control point is being set, optional.

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

Examples


 // 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";