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

Synopsis

polyContourProjection [-caching boolean] [-constructionHistory boolean] [-createNewMap boolean] [-flipRails boolean] [-insertBeforeDeformers boolean] [-method int] [-name string] [-nodeState int] [-offset0 linear] [-offset1 linear] [-offset2 linear] [-offset3 linear] [-reduceShear float] [-smoothness0 float] [-smoothness1 float] [-smoothness2 float] [-smoothness3 float] [-userDefinedCorners boolean] [-worldSpace boolean]

polyContourProjection is undoable, queryable, and editable.

Performs a contour stretch UV projection onto an object.

Return value

stringThe node name.

In query mode, return type is based on queried flag.

Related

polyClipboard, polyCylindricalProjection, polyEditUV, polyForceUV, polyMapCut, polyMapDel, polyMapSew, polyMoveFacetUV, polyMoveUV, polyPlanarProjection, polyProjection, polySphericalProjection, polyUVSet, untangleUV

Flags

caching, constructionHistory, createNewMap, flipRails, insertBeforeDeformers, method, name, nodeState, offset0, offset1, offset2, offset3, reduceShear, smoothness0, smoothness1, smoothness2, smoothness3, userDefinedCorners, worldSpace
Long name (short name) Argument types Properties
-createNewMap(-cm) boolean createqueryedit
This flag when set true will create a new map with the name passed in, if the map does not already exist.
-flipRails(-fr) boolean createqueryedit
If true, flip which curves are the rails of the birail surface.
-insertBeforeDeformers(-ibd) boolean create
This flag specifies if the projection node should be inserted before or after deformer nodes already applied to the shape. Inserting the projection after the deformer leads to texture swimming during animation and is most often undesirable.
C: Default is on.
-method(-m) int createqueryedit
Sets which projection method to use. Valid values are
0: Walk Contours
1: NURBS Projection
-offset0(-o0) linear createqueryedit
Sets the offset on edge 0 of the NURBS surface.
-offset1(-o1) linear createqueryedit
Sets the offset on edge 1 of the NURBS surface.
-offset2(-o2) linear createqueryedit
Sets the offset on edge 2 of the NURBS surface.
-offset3(-o3) linear createqueryedit
Sets the offset on edge 3 of the NURBS surface.
-reduceShear(-rs) float createqueryedit
Sets the 'reduce shear' parameter of the projection.
-smoothness0(-s0) float createqueryedit
Sets the smoothness of edge 0 of the NURBS surface.
-smoothness1(-s1) float createqueryedit
Sets the smoothness of edge 1 of the NURBS surface.
-smoothness2(-s2) float createqueryedit
Sets the smoothness of edge 2 of the NURBS surface.
-smoothness3(-s3) float createqueryedit
Sets the smoothness of edge 3 of the NURBS surface.
-userDefinedCorners(-udc) boolean createqueryedit
If true, the four vertices specified by user will be taken as corners to do the projection.
-worldSpace(-ws) boolean createqueryedit
This flag specifies which reference to use. If on : all geometrical values are taken in world reference. If off : all geometrical values are taken in object reference.
C: Default is off.
Q: When queried, this flag returns an int.
Common flags
-caching(-cch) boolean createedit
Toggle caching for all attributes so that no recomputation is needed.
-constructionHistory(-ch) boolean createquery
Turn the construction history on or off (where applicable). If construction history is on then the corresponding node will be inserted into the history chain for the mesh. If construction history is off then the operation will be performed directly on the object.
Note: If the object already has construction history then this flag is ignored and the node will always be inserted into the history chain.
-name(-n) string create
Give a name to the resulting node.
-nodeState(-nds) int createqueryedit
Defines how to evaluate the node.
  • 0: Normal
  • 1: PassThrough
  • 2: Blocking
  • 3: Internally disabled. Will return to Normal state when enabled
  • 4: Internally disabled. Will return to PassThrough state when enabled
  • 5: Internally disabled. Will return to Blocking state when enabled

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.

MEL examples

// Create a plane.
polyPlane  -sx 10 -sy 10 -n plane;

// Deform the plane and planar project UVs onto it.
softMod -falloffRadius 1 plane;
move -r -os -wd 0 0 -0.5 ;
select -r plane;
delete -ch plane;
polyProjection -ch 1 -type Planar -ibd off -md y  plane.f[0:99];

// Create a lambert node.
shadingNode -asShader lambert -n myLambert;
sets -renderable true -noSurfaceShader true -empty -name myLambertSG;
connectAttr -f myLambert.outColor myLambertSG.surfaceShader;

// Create a texture checker.
shadingNode -asTexture checker;
shadingNode -asUtility place2dTexture;
connectAttr place2dTexture1.outUV checker1.uv;
setAttr place2dTexture1.repeatU 4;
setAttr place2dTexture1.repeatV 4;

// Assign the texture the the lambert node.
connectAttr -f checker1.outColor myLambert.color;

// Set the textured display mode.
if ( `getPanel -to ( eval( "getPanel -withFocus" ) )` ) {
   string $currentPanel = `getPanel -withFocus`;
   modelEditor -edit -da "smoothShaded" -displayTextures on -dl "default" $currentPanel;
}

// Assign the lambert shader to the plane.
sets -e -forceElement myLambertSG plane;

// Use the contour stretch projection to assign 'rectangular' UVs to a strip of faces
polyContourProjection -ch 1 -m 0 plane.f[30:69];