pymel.core.modeling.polyProjection

polyProjection(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
constructionHistory (ch) bool ../../../_images/create.gif
 
Turn the construction history on or off (where applicable)
createNewMap (cm) bool ../../../_images/create.gif
 
Create new map if does not existsFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
imageCenterX (icx) float ../../../_images/create.gif
 
Specifies the X (U) translation of the projected UVs Default is 0.5
imageCenterY (icy) float ../../../_images/create.gif
 
Specifies the Y (V) translation of the projected UVs Default is 0.5
imageScaleU (isu) float ../../../_images/create.gif
 
Specifies the U scale factor of the projected UVs Default is 1
imageScaleV (isv) float ../../../_images/create.gif
 
Specifies the V scale factor of the projected UVs Default is 1
insertBeforeDeformers (ibd) bool ../../../_images/create.gif
 

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 ../../../_images/create.gif
 

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 ../../../_images/create.gif
 

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 ../../../_images/create.gif
 
Specifies the X coordinate of the center of the projection manipulator
projectionCenterY (pcy) float ../../../_images/create.gif
 
Specifies the Y coordinate of the center of the projection manipulator
projectionCenterZ (pcz) float ../../../_images/create.gif
 
Specifies the Z coordinate of the center of the projection manipulator
projectionScaleU (psu) float ../../../_images/create.gif
 
Specifies the U scale component of the projection manipulator
projectionScaleV (psv) float ../../../_images/create.gif
 
Specifies the V scale component of the projection manipulator
rotateX (rx) float ../../../_images/create.gif
 
Specifies the X-axis rotation of the projection manipulator
rotateY (ry) float ../../../_images/create.gif
 
Specifies the Y-axis rotation of the projection manipulator
rotateZ (rz) float ../../../_images/create.gif
 
Specifies the Z-axis rotation of the projection manipulator
rotationAngle (ra) float ../../../_images/create.gif
 
Specifies the rotation of the projected UVs in the UV space Default is 0
seamCorrect (sc) bool ../../../_images/create.gif
 
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) bool ../../../_images/create.gif
 

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 ../../../_images/create.gif
 
Specify the type of mapping to be performed Valid values for the STRING are “planar” “cylindrical” “spherical” Default is planar
uvSetName (uvs) unicode ../../../_images/create.gif
 
Specifies name of the uv set to work on

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

Previous topic

pymel.core.modeling.polyProjectCurve

Next topic

pymel.core.modeling.polyPyramid

Core

Core Modules

Other Modules

This Page