The core solver is implemented as a Mel command, “peelSolve”. This command can be written into your own scripts.
To get the latest Mel options, run “peelSolve -h”.
To get information about the status of the license, and the locations of where the license file is looked for, run “peelSolve -lic”
Here are the arguments:
-s|skel string | Specify a root node (may be used more than once) |
-d|debug | Output debugging data |
-ns|nosolve | Do not solve, just parse the scene |
-lc|listChannels | List channels that the solve writes to |
-lt|listTransforms | List transforms the solver affects |
-la|listActive | List active transform nodes |
-lp|listPassive | List passive transform nodes |
-i|iter int | Set number of iterations |
-v|version | Show version then exit |
-st|start float | Set start frame |
-en|end float | Set end frame |
-in|inc float | Set increment amount |
-r|reverse | Solve backwards |
-stat|statistics | Show solve statistics |
-m|method int | 0: Matrix/Fast, 1: Scecant/Regular, 2: Descent/Slow |
-ct|calibType int | 1: Constant, 2: Angle, 3: Iteration, 4: Angle/Iteration |
-cal|calibrate | Do a calibration solve (enable calib dof and disable len/trans dofs) |
-c|cache | Cache results |
-scale|solveScale float | Scale translations by a value |
-f|file string | Write solve data to file for offline solving. Must be one -f for every -s flag if used |
-rd|readDirect | Read fcurve data directly, rather than evaluating the scenegraph |
-ref|refine | Read keys and resolve from existing keyframe for improvement |
-gs|gradientSamples int | Number of samples to take during gradient estimation; 1, 2, 4. |
Mel Examples
// Solve a single frame and don't write keys
peelSolve -s joint1
// Return list of active joints – always use eval, not ...
string $jointList = eval("peelSolve -s joint1 -nosolve -la");
// Solve a frame range
peelSolve -s joint1 -st 1 -en 100 -in 1
// Solve to a file for offline solving
peelSolve -s joint1 -st 1 -en 100 -inc 1 -f "c:\joint1_solve.xml"
// Select all passive joints using the roots specified by the
// Options node
string $roots[] = getAttr("peelSolveOptions.rootNodes");
if(size($roots)==0) error("No skeleton top node defined");
string $ret = "";
for($i=0 ; $i< size($roots); $i++) $ret += "-s " + $roots[$i];
string $jointList[] = eval("peelSolve -lp " + $ret);
select $jointList;