Your Ad Here

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

Synopsis

polyTransfer([alternateObject=string], [constructionHistory=boolean], [name=string], [triangles=boolean], [uvSets=boolean], [vertexColor=boolean], [vertices=boolean])

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

polyTransfer is undoable, queryable, and editable.

Transfer information from one polygonal object to another one. Both objects must have identical topology, that is same vertex, edge, and face numbering. The flags specify which of the vertices, UV sets vertex colors, or triangles will be copied.

Flags

alternateObject, constructionHistory, name, triangles, uvSets, vertexColor, vertices
Long name (short name) [argument types] Properties
alternateObject(ao) string createqueryedit
Name of the alternate object.

In query mode, this flag needs a value.

uvSets(uv) boolean createqueryedit
When true, the UV sets are copied from the alternate object.
C: Default is "on".

In query mode, this flag needs a value.

vertices(v) boolean createqueryedit
When true, the vertices positions are copied from the alternate object.
C: Default is "off".

In query mode, this flag needs a value.

vertexColor(vc) boolean createqueryedit
When true, the colors per vertex are copied from the alternate object.
C: Default is "off".

In query mode, this flag needs a value.

triangles(t) boolean createqueryedit
When true, the triangulation is copied from the alternate object. This is only useful if the node is the last operation in the obejct history. Any subsequent operation may change the triangulation.
Warning: Copying the triangulation from an object to another may result in rendering artifacts for holed or concave faces.
C: Default is "off".

In query mode, this flag needs a value.

name(n) string create
Name the resulting object.
constructionHistory(ch) boolean createquery
Turn the construction history on or off (where applicable).
Q: When queried, this flag returns an int.

In query mode, this flag needs a value.


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.

Return value


string representing the node name.

Python examples

import maya.cmds as cmds

# Create two objects with same a cube.
cmds.polyCube( sx=5, sy=5, sz=5, n='plg' )
cmds.polyCube( sx=5, sy=5, sz=5, n='atlPlg' )

# Tweak the geometry of the first object
cmds.select( 'plg.vtx[0:50]', r=True )
cmds.move( .1, .2, .3, r=True )

# Spherical mapping on the alternate object
cmds.polyProjection( 'atlPlg.f[0:149]', type='Spherical' )

# Copy the UVs from the alternate to the first object.
cmds.polyTransfer( 'plg', uv=1, ao='atlPlg' )

  

Return to Autodesk Index


Your Ad Here