Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.

Synopsis

polyProjection([constructionHistory=boolean], [createNewMap=boolean], [imageCenterX=float], [imageCenterY=float], [imageScaleU=float], [imageScaleV=float], [insertBeforeDeformers=boolean], [keepImageRatio=boolean], [mapDirection=string], [projectionCenterX=float], [projectionCenterY=float], [projectionCenterZ=float], [projectionScaleU=float], [projectionScaleV=float], [rotateX=float], [rotateY=float], [rotateZ=float], [rotationAngle=float], [seamCorrect=boolean], [smartFit=boolean], [type=string], [uvSetName=string])

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

polyProjection is undoable, NOT queryable, and NOT editable.

Creates a mapping on the selected polygonal faces. When construction history is created, the name of the new node is returned. In other cases, the command returns nothing.

Return value

stringName of node created

Keywords

poly, mapping, projection, planar, cylindrical, spherical

Related

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

Flags

constructionHistory, createNewMap, imageCenterX, imageCenterY, imageScaleU, imageScaleV, insertBeforeDeformers, keepImageRatio, mapDirection, projectionCenterX, projectionCenterY, projectionCenterZ, projectionScaleU, projectionScaleV, rotateX, rotateY, rotateZ, rotationAngle, seamCorrect, smartFit, type, uvSetName
Long name (short name) Argument types Properties
constructionHistory(ch) boolean create
Turn the construction history on or off (where applicable).
createNewMap(cm) boolean create
Create new map if it does not exist.
imageCenterX(icx) float create
Specifies the X (U) translation of the projected UVs. Default is 0.5.
imageCenterY(icy) float create
Specifies the Y (V) translation of the projected UVs. Default is 0.5.
imageScaleU(isu) float create
Specifies the U scale factor of the projected UVs. Default is 1.
imageScaleV(isv) float create
Specifies the V scale factor of the projected UVs. Default is 1.
insertBeforeDeformers(ibd) boolean create
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. Default is on.
keepImageRatio(kir) boolean create
Specifies if the xy scaling in the planar projection has to be uniform. By setting this flag, the texture aspect ratio is preserved. This flag is ignored for cylindrical and spherical projections.
mapDirection(md) string create
Specifies the direction of the projection. By specifying this flag, the projection placement values (pcx, pcy, pcz, rx, ry, rz, psu, psv) are internally computed. If both this flag and the projection values are specified, the projection values are ignored. Valid Values are : X Projects along the X Axis Y Projects along the Y Axis Z Projects along the Z Axis bestPlane Projects on the best plane fitting the object camera Projects along the viewing direction perspective Creates perspective projection if current camera is perspective Default is bestPlane.
projectionCenterX(pcx) float create
Specifies the X coordinate of the center of the projection manipulator.
projectionCenterY(pcy) float create
Specifies the Y coordinate of the center of the projection manipulator.
projectionCenterZ(pcz) float create
Specifies the Z coordinate of the center of the projection manipulator.
projectionScaleU(psu) float create
Specifies the U scale component of the projection manipulator.
projectionScaleV(psv) float create
Specifies the V scale component of the projection manipulator.
rotateX(rx) float create
Specifies the X-axis rotation of the projection manipulator.
rotateY(ry) float create
Specifies the Y-axis rotation of the projection manipulator.
rotateZ(rz) float create
Specifies the Z-axis rotation of the projection manipulator.
rotationAngle(ra) float create
Specifies the rotation of the projected UVs in the UV space. Default is 0.
seamCorrect(sc) boolean create
Specifies if seam correction has to be done for spherical and cylindrical projections. This flag is ignored, if the planar projection is specified.
smartFit(sf) boolean create
Specifies if the projection manipulator has to be placed fitting the object. Used for cylindrical and spherical projections. For smart fitting the planar projection, the mapDirection flag has to be used, since there are several options for smart fitting a planar projection.
type(t) string create
Specify the type of mapping to be performed. Valid values for the STRING are "planar" "cylindrical" "spherical" Default is planar.
uvSetName(uvs) string create
Specifies name of the uv set to work on.

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.

Python examples

import maya.cmds as cmds

cmds.file( f=True, new=True )
# To create a planar projection
#
cmds.polyPlane( sx=10, sy=10 )
cmds.move( 0, 0, r=3 )
cmds.polyProjection( 'pPlane1.f[0:99]', type='Planar', md='y' )
# Result: polyPlanarProj1 #
# To create a cylindrical projection
#
cmds.polyCylinder()
cmds.polyProjection( 'pCylinder1.f[0:21]', type='Cylindrical' )
# Result: polyCylProj1 #
# To create a spherical projection
#
cmds.polySphere()
cmds.move( 0, 0, r=-3 )
cmds.polyProjection( 'pSphere1.f[0:399]', type='Spherical' )
# Result: polySphProj1 #