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

Synopsis

cpPanel [-clothName] [-clothShape] [-curveVertices] [-facets] [-name string] [-newStitcher] [-property] [-query] [-resolutionFactor float] [-stitcherName string] [-stitcherResolution float]

cpPanel is undoable, queryable, and editable.

This command creates a panel node from a set of closed curves and optionally creates a new garment (stitcher node) for it. If a panel node is being created, the selection must contain a set of nurbs curves that form a planar closed loop. The curves are not required to be in any order. If a new garment is to be created, the selection can either contain a panel to go into the garment or a set of nurbs curves to form the first panel for the garment.

Flags

clothName, clothShape, curveVertices, facets, name, newStitcher, property, query, resolutionFactor, stitcherName, stitcherResolution
Long name (short name) [argument types] Properties
-clothShape(-c) query
This option requires a panel to be selected and returns the name of the cloth shape which contains the panel.

In query mode, this flag needs a value.

-clothName(-cn) create
This option uses the given name to name the newly created cloth shape and is only used with the -newStitcher option.
-curveVertices(-cv) query
Returns the vertex ids of the cloth mesh that corresponds to the selected curve. Return type is int array.

In query mode, this flag needs a value.

-facets(-f) query
This option requires a panel to be selected and returns the list of facets that compose the panel.

In query mode, this flag needs a value.

-name(-n) string create
This option uses the given name when creating a panel.
-newStitcher(-ns) create
This option creates a new panel and also creates a new stitcher. The new panel is connected to the new stitcher. This is how one creates a new garment.
-property(-p) query
This option requires a panel to be selected and returns the name of the property that is currently assigned to the panel.

In query mode, this flag needs a value.

-query(-q) query
This option requires a panel to be selected and specifies that the command is a query.

In query mode, this flag needs a value.

-resolutionFactor(-rf) float create
This option assigns the given resolution factor to the panel when it is created.
-stitcherName(-sn) string create
This option uses the given name when creating a stitcher and is only used with the -newStitcher option.
-stitcherResolution(-sr) float create
This option assigns the given resolution as the base resolution of the stitcher when it is created. This option is only used with the -newStitcher option.

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


The panel transform and shape names. If a stitcher node is created, the stither name will also be returned.

Related

cpButton, cpCollision, cpConstraint, cpProperty, cpSeam, cpSolver, cpTool

MEL examples

// Create a new panel from selection.
cpPanel;

// Create a new panel from named object (closed curve group).
cpPanel nurbsSquare;

// Return vertex indices of the cloth that is on panel curve.
cpPanel -q -curveVertices;

// Return property assigned to selected panel.
cpPanel -q -property;

// Return name of cloth shape that contains selected panel.
cpPanel -q -clothShape;

// Return list of facets (indices) that are in panel.
cpPanel -q -facets;