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

Synopsis

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

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

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) boolean 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) boolean query
The current busy loop value.

In query mode, this flag needs a value.

current(c) boolean 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) boolean 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) boolean edit
Create a cloth mesh from a polygonal shape.
createCollisionObject(cco) boolean 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) boolean edit
Clear the simulation timer.
deleteCache(dc) boolean 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) boolean 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) boolean edit
This option disconnects the solver from the time input, allowing animations to be setup and run without running the solver.
enableSolver(es) boolean edit
This option reconnects the solver to the time input.
frameSamples(fs) boolean create
Solver oversample value per time step.
gravity(g) boolean 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) boolean 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) boolean create
Name of solver node.
removeCollisionObject(rco) boolean edit
This option removes a collision object from a solver.
relaxFrameLen(rfl) boolean create
Number of frames used for relaxed property.
resetInterrupt(ri) boolean create
Reset the interrupt state on all of the solvers.
scale(s) boolean create
Internal solver scale of garments used for simulation.
saveAllCache(sac) boolean 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) boolean create
Frame used for start of simulation.
savePositions(svp) boolean 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) boolean edit
Stop a local cloth simulation. It is not necessary to specify which solver.
stepSize(ss) boolean create
Solver step size in seconds.
serviceScheduledRequests(ssr) boolean 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) boolean 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) boolean 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) boolean edit
Update positions, as with -ufo above, but also compute new vertex velocities based on the new positions.
transfer(t) boolean edit
Transfer a garment between solvers.
clothObjectTriangulator(cot) boolean 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) boolean 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) boolean 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) boolean 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 have multiple arguments, passed either as a tuple or a list.

Return value


None

Related

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