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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
constructionHistory (ch) | bool | ||
|
|||
createNewMap (cm) | bool | ||
|
|||
imageCenterX (icx) | float | ||
|
|||
imageCenterY (icy) | float | ||
|
|||
imageScaleU (isu) | float | ||
|
|||
imageScaleV (isv) | float | ||
|
|||
insertBeforeDeformers (ibd) | bool | ||
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) | bool | ||
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) | unicode | ||
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 | ||
|
|||
projectionCenterY (pcy) | float | ||
|
|||
projectionCenterZ (pcz) | float | ||
|
|||
projectionScaleU (psu) | float | ||
|
|||
projectionScaleV (psv) | float | ||
|
|||
rotateX (rx) | float | ||
|
|||
rotateY (ry) | float | ||
|
|||
rotateZ (rz) | float | ||
|
|||
rotationAngle (ra) | float | ||
|
|||
seamCorrect (sc) | bool | ||
|
|||
smartFit (sf) | bool | ||
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) | unicode | ||
|
|||
uvSetName (uvs) | unicode | ||
|
Derived from mel command maya.cmds.polyProjection
Example:
import pymel.core as pm
pm.file( f=True, new=True )
# To create a planar projection
#
pm.polyPlane( sx=10, sy=10 )
pm.move( 0, 0, r=3 )
pm.polyProjection( 'pPlane1.f[0:99]', type='Planar', md='y' )
polyPlanarProj1
# To create a cylindrical projection
#
pm.polyCylinder()
pm.polyProjection( 'pCylinder1.f[0:21]', type='Cylindrical' )
polyCylProj1
# To create a spherical projection
#
pm.polySphere()
pm.move( 0, 0, r=-3 )
pm.polyProjection( 'pSphere1.f[0:399]', type='Spherical' )
polySphProj1