• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Edge Appender 0.0.2

jeffwincek Dec 6th, 2011 22 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. # this requires a polygonal object to already exist with some
2. # fairly specific edge numberings and positioning
3. # the top comments are notes on how maya constructs edges what are the appropriate
4. # commands to add new faces to the existing ones.
5. #stringconstruct = 'a=[' + str(10) + ',(-0,0,' + str(3)+ ')]'
6. #eval('plg.polyAppend(' + stringconstruct + ')')
7.
8. #stringconstruct = 'a=[' + str(7) + ',(-4,0,' + str(3)+ ')]'
9. #eval('plg.polyAppend(' + stringconstruct + ')')
10.
11. #stringconstruct = 'a=[' + str(6) + ',(-0,0,' + str(2)+ ')]'
12. #eval('plg.polyAppend(' + stringconstruct + ')')
13.
14. #stringconstruct = 'a=[' + str(3) + ',(-4,0,' + str(2)+ ')]'
15. #eval('plg.polyAppend(' + stringconstruct + ')')
16.
17. #stringconstruct = 'a=[' + str(2) + ',(-0,0,' + str(1)+ ')]'
18. #eval('plg.polyAppend(' + stringconstruct + ')')
19. import math
20. import maya.cmds as plg
21.
22. edgeNum = 2
23. xValEven = 1
24. xValOdd = -4
25. yVal = 0
26. zVal = 1
27. for i in range(1,100):
28.         stringconstruct = 'a=[' + str(edgeNum) + ',(' + str(xValEven) + ',0,' + str(zVal)+ ')]'
29.         eval('plg.polyAppend(' + stringconstruct + ')')
30.         edgeNum = edgeNum + 1
31.         zVal = zVal + 1
32.         stringconstruct = 'a=[' + str(edgeNum) + ',(' + str(xValOdd) + ',0,' + str(zVal)+ ')]'
33.         eval('plg.polyAppend(' + stringconstruct + ')')
34.         edgeNum = edgeNum + 3
35.         xValEven = math.cos((i*math.pi)/5)
36.         xValOdd = math.cos((i*math.pi)/5)-4
37.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
Not a member of Pastebin yet?