pymel.core.modeling.polyPrimitive¶
- polyPrimitive(*args, **kwargs)¶
Create a polygon primative
Flags:
Long Name / Short Name Argument Types Properties axis / ax float, float, float This flag specifies the primitive axis used to build the primitive polygon. Q: When queried, this flag returns a float[3]. caching / cch bool 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. createUVs / cuv int frozen / fzn bool name / n unicode Sets the name of the newly-created node. If it contains namespace path, the new node will be created under the specified namespace; if the namespace does not exist, it will be created. Flag can have multiple arguments, passed either as a tuple or a list. nodeState / nds int object / o bool polyType / pt int This flag allows a specific primitive poly to be selected for creation of mesh, The valid values is 0 0 implies soccer ball to be created. C: Default is 0 radius / r float 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 This flag specifies the side length of primitive polygon. C: Default is 1.0. Q: When queried, this flag returns a float. Common flags texture / tx int Derived from mel command maya.cmds.polyPrimitive
Example:
import pymel.core as pm # Create a soccerBall with radius 1 side length 0.4037 pm.polyPrimitive( r=1, l=0.4036, pt=0)