Go to: Synopsis. Return value. Keywords.
Related. Flags.
Python examples.
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.
string |
Name of node created |
poly, mapping, projection, planar, cylindrical, spherical
polyClipboard, polyCylindricalProjection,
polyEditUV, polyForceUV, polyMapCut, polyMapDel, polyMapSew, polyMoveFacetUV, polyMoveUV, polyPlanarProjection, polySphericalProjection,
polyUVSet, untangleUV
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 |
type(t) |
string |
|
|
Specify the type of mapping to be performed Valid values for
the STRING are "planar" "cylindrical" "spherical" Default is
planar |
|
insertBeforeDeformers(ibd) |
boolean |
|
|
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. |
|
seamCorrect(sc) |
boolean |
|
|
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 |
|
|
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. |
|
keepImageRatio(kir) |
boolean |
|
|
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 |
|
|
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 |
|
|
Specifies the X coordinate of the center of the projection
manipulator |
|
projectionCenterY(pcy) |
float |
|
|
Specifies the Y coordinate of the center of the projection
manipulator |
|
projectionCenterZ(pcz) |
float |
|
|
Specifies the Z coordinate of the center of the projection
manipulator |
|
rotateX(rx) |
float |
|
|
Specifies the X-axis rotation of the projection
manipulator |
|
rotateY(ry) |
float |
|
|
Specifies the Y-axis rotation of the projection
manipulator |
|
rotateZ(rz) |
float |
|
|
Specifies the Z-axis rotation of the projection
manipulator |
|
projectionScaleU(psu) |
float |
|
|
Specifies the U scale component of the projection
manipulator |
|
projectionScaleV(psv) |
float |
|
|
Specifies the V scale component of the projection
manipulator |
|
imageCenterX(icx) |
float |
|
|
Specifies the X (U) translation of the projected UVs Default is
0.5 |
|
imageCenterY(icy) |
float |
|
|
Specifies the Y (V) translation of the projected UVs Default is
0.5 |
|
rotationAngle(ra) |
float |
|
|
Specifies the rotation of the projected UVs in the UV space
Default is 0 |
|
imageScaleU(isu) |
float |
|
|
Specifies the U scale factor of the projected UVs Default is
1 |
|
imageScaleV(isv) |
float |
|
|
Specifies the V scale factor of the projected UVs Default is
1 |
|
constructionHistory(ch) |
boolean |
|
|
Turn the construction history on or off (where applicable) |
|
uvSetName(uvs) |
string |
|
|
Specifies name of the uv set to work on |
|
createNewMap(cm) |
boolean |
|
|
Create new map if does not exists |
|
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. |
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 #