pymel.core.modeling.polyMoveVertex¶
- polyMoveVertex(*args, **kwargs)¶
Modifies vertices of a polygonal object. Translate, rotate or scale vertices in local or world space.
Flags:
Long Name / Short Name Argument Types Properties caching / cch bool Toggle caching for all attributes so that no recomputation is needed. constructionHistory / ch bool Turn the construction history on or off (where applicable). If construction history is on then the corresponding node will be inserted into the history chain for the mesh. If construction history is off then the operation will be performed directly on the object. Note:If the object already has construction history then this flag is ignored and the node will always be inserted into the history chain. frozen / fzn bool gain / ga float localDirection / ld float, float, float This flag specifies the X axis for local space. C: Default is 0.0 0.0 1.0. Q: When queried, this flag returns a float[3]. localDirectionX / ldx float This flag specifies X coord for thr X axis. C: Default is 0.0. Q: When queried, this flag returns a float. localDirectionY / ldy float This flag specifies Y coord for thr X axis. C: Default is 0.0. Q: When queried, this flag returns a float. localDirectionZ / ldz float This flag specifies Z coord for thr X axis. C: Default is 1.0. Q: When queried, this flag returns a float. localTranslate / lt float, float, float Local translation vector. C: Default is 0.0 0.0 0.0. Q: When queried, this flag returns a float[3]. localTranslateX / ltx float Local translation X coord. C: Default is 0.0. Q: When queried, this flag returns a float. localTranslateY / lty float Local translation Y coord. C: Default is 0.0. Q: When queried, this flag returns a float. localTranslateZ / ltz float Local translation Z coord : Move along the vertex normal. C: Default is 0.0. Q: When queried, this flag returns a float. name / n unicode Give a name to the resulting node. nodeState / nds int Defines how to evaluate the node. 0: Normal1: PassThrough2: Blocking3: Internally disabled. Will return to Normal state when enabled4: Internally disabled. Will return to PassThrough state when enabled5: Internally disabled. Will return to Blocking state when enabledFlag can have multiple arguments, passed either as a tuple or a list. pivot / pvt float, float, float This flag specifies the pivot for scaling and rotation. C: Default is 0.0 0.0 0.0. Q: When queried, this flag returns a float[3]. pivotX / pvx float This flag specifies the X pivot for scaling and rotation. C: Default is 0.0. Q: When queried, this flag returns a float. pivotY / pvy float This flag specifies the Y pivot for scaling and rotation. C: Default is 0.0. Q: When queried, this flag returns a float. pivotZ / pvz float This flag specifies the Z pivot for scaling and rotation. C: Default is 0.0. Q: When queried, this flag returns a float. Local Values random / ran float This flag specifies the random value for all parameters. C: Default is 0.0. The range is [-10.0, 10.0]. Q: When queried, this flag returns a float. rotate / ro float, float, float This flag specifies the rotation angles around X, Y, Z. C: Default is 0.0 0.0 0.0. Q: When queried, this flag returns a float[3]. rotateX / rx float This flag specifies the rotation angle around X. C: Default is 0.0. Q: When queried, this flag returns a float. rotateY / ry float This flag specifies the rotation angle around Y. C: Default is 0.0. Q: When queried, this flag returns a float. rotateZ / rz float This flag specifies the rotation angle around Z. C: Default is 0.0. Q: When queried, this flag returns a float. scale / s float, float, float This flag specifies the scaling vector. C: Default is 1.0 1.0 1.0. Q: When queried, this flag returns a float[3]. scaleX / sx float This flag specifies X for scaling vector. C: Default is 1.0. Q: When queried, this flag returns a float. scaleY / sy float This flag specifies Y for scaling vector. C: Default is 1.0. Q: When queried, this flag returns a float. scaleZ / sz float This flag specifies Z for scaling vector. C: Default is 1.0. Q: When queried, this flag returns a float. translate / t float, float, float This flag specifies the translation vector. C: Default is 0.0 0.0 0.0. Q: When queried, this flag returns a float[3]. translateX / tx float This flag specifies the X translation vector. C: Default is 0.0. Q: When queried, this flag returns a float. translateY / ty float This flag specifies the Y translation vector. C: Default is 0.0. Q: When queried, this flag returns a float. translateZ / tz float This flag specifies the Z translation vector. C: Default is 0.0. Q: When queried, this flag returns a float. worldSpace / ws bool This flag specifies which reference to use. If on: all geometrical values are taken in world reference. If off: all geometrical values are taken in object reference. C: Default is off. Q: When queried, this flag returns an int. Global ValuesCommon flags Derived from mel command maya.cmds.polyMoveVertex
Example:
import pymel.core as pm # Create a sphere. pm.polySphere( r=5, n='plg' ) # Move vertices as the scaling vector (1.0, 1.5, 1.0). pm.polyMoveVertex( 'plg.vtx[200:379]', 'plg.vtx[381]', s=(1.0, 1.5, 1.0) ) # Translate vertices as the vector (0.0, 2.0, 0.0). pm.polyMoveVertex( 'plg.vtx[200:379]', 'plg.vtx[381]', ty=2.0 )