Go to: Synopsis. Flags. Return value. Related. MEL examples.

Synopsis

cpSolver [-busyLoopMode boolean] [-busyLoopValue] [-cacheBodies cache filename] [-cacheFrames cache filename] [-clearTimer] [-clothObject] [-clothObjectTriangulator] [-clothSolverType] [-collObjDebug cmd] [-collisionObject] [-compressCache] [-createClothMesh] [-createCollisionObject] [-current] [-deleteCache] [-deleteRestOfCache] [-disableSolver] [-enableSolver] [-frameSamples] [-getUVs cloth panel] [-gravity] [-help] [-isInterrupted] [-loadCache cache filename] [-name] [-relaxFrameLen] [-removeCollisionObject] [-resetInterrupt] [-saveAllCache] [-saveCache string] [-savePositions] [-scale] [-serviceScheduledRequests] [-start] [-startFrame] [-stepSize] [-stop] [-transfer] [-updateAllFromOutput] [-updateFromOutput] [-writeSolverHistory string]

cpSolver is undoable, queryable, and editable.

This command is used to create a cloth solver node and to perform various edit operations on it. When executed without any flags, this command creates a new cloth solver node.

Flags

busyLoopMode, busyLoopValue, cacheBodies, cacheFrames, clearTimer, clothObject, clothObjectTriangulator, clothSolverType, collObjDebug, collisionObject, compressCache, createClothMesh, createCollisionObject, current, deleteCache, deleteRestOfCache, disableSolver, enableSolver, frameSamples, getUVs, gravity, help, isInterrupted, loadCache, name, relaxFrameLen, removeCollisionObject, resetInterrupt, saveAllCache, saveCache, savePositions, scale, serviceScheduledRequests, start, startFrame, stepSize, stop, transfer, updateAllFromOutput, updateFromOutput, writeSolverHistory
Long name (short name) [argument types] Properties
-help(-h) create
Prints a quick help message.
-busyLoopMode(-blm) boolean create
Turns on busy loop mode in the solver. The solver monitors how it is progressing in the simulation. If it is having difficulty it adjusts its own parameters and restarts the simulation. However, the solver depends on Maya running in interactive mode. If you are running in a none interactive mode you must turn this mode on for fail detection to work. You also must service scheduled restarts by using the -serviceScheduledRequests. See the mel script cpRunBatch.mel for an example of this flag's use.
-busyLoopValue(-blv) query
The current busy loop value.

In query mode, this flag needs a value.

-current(-c) queryedit
Set the new current solver state.

In query mode, this flag needs a value.

-cacheBodies(-cb) cache filename query
Return the vertices for each cloth body in the given cache file.

In query mode, this flag needs a value.

-compressCache(-cc) edit
This option will remove much of the data from the cache that is not directly involved with display. A compressed cache can still be extended through simulation, but not partially deleted.
-createClothMesh(-ccm) edit
Create a cloth mesh from a polygonal shape.
-createCollisionObject(-cco) edit
Create a collision object from a polygonal shape.
-cacheFrames(-cf) cache filename query
Return the number of frames in the given cache file.

In query mode, this flag needs a value.

-collObjDebug(-cob) cmd create
This option is used to manage the Collison Object Debug mode. It requires one of the following arguments. add - Add the selected collision objects to be monitored when the Collision Object Debug mode is enabled remove - Remove the selected collision objects from being monitored when the Collision Object Debug mode is enabled clear - Clear all collision objects from being monitored when the Collision Object Debug mode is enabled first - Display the first frame of collision debug objects. All other frames will be hidden. previous - Display the previous frame of collision debug objects. All other frames will be hidden. next - Display the next frame of collision debug objects. All other frames will be hidden. last - Display the last frame of collision debug objects. All other frames will be hidden. showAll - Display every frame of collision debug objects. hideAll - Hide every frame of collision debug objects.
-clearTimer(-ct) edit
Clear the simulation timer.
-deleteCache(-dc) edit
This option requires a cloth solver to be selected. The command deletes the cache for all cloth bodies over all frames. This is useful when the cloth properties or locations of the cloth or rigid bodies have been changed.
-deleteRestOfCache(-drc) edit
This option deletes the cache from the current frame to the end of the cache. Data for frames before the current frame are left intact.
-disableSolver(-ds) edit
This option disconnects the solver from the time input, allowing animations to be setup and run without running the solver.
-enableSolver(-es) edit
This option reconnects the solver to the time input.
-frameSamples(-fs) create
Solver oversample value per time step.
-gravity(-g) create
Gravity vector used by solver.
-getUVs(-uvs) cloth panel
This flag will accept a cloth/panel pair or simply a cloth object name followed by an empty string. The cloth/panel pair will allow the user to retrieve UV-values on a per-panel level, if the scene was constructed with panels. If just a cloth name is provided, the UV-values for the entire mesh will be returned.
-isInterrupted(-ii) query
Returns true if all solvers have been interrupted.

In query mode, this flag needs a value.

-loadCache(-lc) cache filename edit
This option loads the given cache into the solver.
-name(-n) create
Name of solver node.
-removeCollisionObject(-rco) edit
This option removes a collision object from a solver.
-relaxFrameLen(-rfl) create
Number of frames used for relaxed property.
-resetInterrupt(-ri) create
Reset the interrupt state on all of the solvers.
-scale(-s) create
Internal solver scale of garments used for simulation.
-saveAllCache(-sac) edit
This option saves the cache out to the file for all selected solvers. The file names are given by the cache attribute. Users can change the filename by changing the cache attribute value.
-saveCache(-sc) string edit
This option saves the cache out to a file. User must give the file name on the command line. The cache attribute is not used. It works for one and only one selected solver.
-startFrame(-sf) create
Frame used for start of simulation.
-savePositions(-svp) edit
This option saves the current vertex positions of the selected cloth object as its initial set of positions. This option will also prevent subsequent changes to the initial geometry from overwriting the initial positions.
-stop(-stp) edit
Stop a local cloth simulation. It is not necessary to specify which solver.
-stepSize(-ss) create
Solver step size in seconds.
-serviceScheduledRequests(-ssr) create
When busyLoopMode is on, this flag allows you to run the solver's internal restart mechanism. This mechanism is triggered whenever the solver detects a failure in the simuation from bad cloth configurations.
-start(-st) edit
Start a local cloth simulation. This allows you to run the cloth solver without advancing the maya time clock. Only one solver at a time is allowed to run a local simulation. Specify the solver by selecting it, selecting a cloth object connected to the solver, or by giving its name on the command line. In the event that no solver is specified, but there is only one solver in the scene, that solver will be used. Use undo/redo to undo the effect of a local simulation.
-updateFromOutput(-ufo) edit
Update from manually modified vertex positions. After moving the vertices of the cloth object using the polygon tools, issue this command to update the cloth solver with the new vertex positions. Vertex velocities are set to zero, to update velocities use -uao
-updateAllFromOutput(-uao) edit
Update positions, as with -ufo above, but also compute new vertex velocities based on the new positions.
-transfer(-t) edit
Transfer a garment between solvers.
-clothObjectTriangulator(-cot) query
Returns a string array consisting of the associated triangulator(s) for the selected object(s) which are triangulated cloth object(s). If none of the selected objects are triangulated cloth objects, nothing is returned.

In query mode, this flag needs a value.

-clothObject(-co) query
Returns a string array consisting of the cloth objects that are selected. If no cloth objects are selected, nothing is returned.

In query mode, this flag needs a value.

-writeSolverHistory(-wsh) string create
Writes the solver callback history data. This is used for diagnostic purposes. Internal use only. This flag requires a string specifying the output file for the history data.
-collisionObject(-clo) query
Returns a string array consisting of the collision objects that are selected. If no collision objects are selected, nothing is returned.

In query mode, this flag needs a value.

-clothSolverType(-cst) create
Name of cloth solver type.

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

Return value


None

Related

cpButton, cpCollision, cpConstraint, cpPanel, cpProperty, cpSeam, cpTool

MEL examples

// Create a cloth solver node.
cpSolver;

// Query for the current solver node.
cpSolver -q -c;

// Set a new current solver node.
cpSolver -e -c cpSolver2;