Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # this requires a polygonal object to already exist with some
- # fairly specific edge numberings and positioning
- # the top comments are notes on how maya constructs edges what are the appropriate
- # commands to add new faces to the existing ones.
- #stringconstruct = 'a=[' + str(10) + ',(-0,0,' + str(3)+ ')]'
- #eval('plg.polyAppend(' + stringconstruct + ')')
- #stringconstruct = 'a=[' + str(7) + ',(-4,0,' + str(3)+ ')]'
- #eval('plg.polyAppend(' + stringconstruct + ')')
- #stringconstruct = 'a=[' + str(6) + ',(-0,0,' + str(2)+ ')]'
- #eval('plg.polyAppend(' + stringconstruct + ')')
- #stringconstruct = 'a=[' + str(3) + ',(-4,0,' + str(2)+ ')]'
- #eval('plg.polyAppend(' + stringconstruct + ')')
- #stringconstruct = 'a=[' + str(2) + ',(-0,0,' + str(1)+ ')]'
- #eval('plg.polyAppend(' + stringconstruct + ')')
- import math
- import maya.cmds as plg
- edgeNum = 2
- xValEven = 1
- xValOdd = -4
- yVal = 0
- zVal = 1
- for i in range(1,100):
- stringconstruct = 'a=[' + str(edgeNum) + ',(' + str(xValEven) + ',0,' + str(zVal)+ ')]'
- eval('plg.polyAppend(' + stringconstruct + ')')
- edgeNum = edgeNum + 1
- zVal = zVal + 1
- stringconstruct = 'a=[' + str(edgeNum) + ',(' + str(xValOdd) + ',0,' + str(zVal)+ ')]'
- eval('plg.polyAppend(' + stringconstruct + ')')
- edgeNum = edgeNum + 3
- xValEven = math.cos((i*math.pi)/5)
- xValOdd = math.cos((i*math.pi)/5)-4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement