pymel.core.modeling.polyPrimitive

polyPrimitive(*args, **kwargs)

Create a polygon primative

Flags:
Long name (short name) Argument Types Properties
axis (ax) float, float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag specifies the primitive axis used to build the primitive polygon.Q: When queried, this flag returns a float[3].
caching (cch) bool ../../../_images/query.gif ../../../_images/edit.gif
   
constructionHistory (ch) bool ../../../_images/create.gif ../../../_images/query.gif
 

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.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

createUVs (cuv) int ../../../_images/query.gif ../../../_images/edit.gif
   
name (n) unicode ../../../_images/create.gif
 
Give a name to the resulting node.
nodeState (nds) int ../../../_images/query.gif ../../../_images/edit.gif
   
object (o) bool ../../../_images/create.gif
 
Create the result, or just the dependency node (where applicable).Common flags
polyType (pt) int ../../../_images/create.gif
 

This flag allows a specific primitive poly to be selected for creation of mesh,The valid values is 00 implies soccer ball to be created.C: Default is 0Common flags

radius (r) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag specifies the radius of the primitive polygon.C: Default is 1.0.Q: When queried, this flag returns a float.
sideLength (l) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag specifies the side length of primitive polygon.C: Default is 1.0.Q: When queried, this flag returns a float.
texture (tx) int ../../../_images/query.gif ../../../_images/edit.gif
   

Derived from mel command maya.cmds.polyPrimitive

Example:

import pymel.core as pm

import maya.cmds as cmds

# Create a soccerBall with radius 1 side length 0.4037
pm.polyPrimitive( r=1, l=0.4036, pt=0)

Previous topic

pymel.core.modeling.polyPoke

Next topic

pymel.core.modeling.polyPrism

Core

Core Modules

Other Modules

This Page