Advertisement
jeffwincek

Proportionizer 0.0.1

Oct 4th, 2011
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. #only proportionizes in the x direction so far
  2. # proportionize means to increase subdivisions such that there is approximately one
  3. # subdiv per scale factor which is currently the height of the object
  4. whichOne= plg.ls(selection =  True)[0]
  5. active = plg.polyEvaluate(whichOne, boundingBox = True)
  6. sizeX = active[0][1] - active[0][0]
  7. sizeY = active[1][1] - active[1][0]
  8. sizeZ = active[2][1] - active[2][0]
  9. XoverY = float(sizeX/sizeY)
  10. howMuch = float(howMuch)
  11. if XoverY > howMuch:
  12.     print 'true'
  13.     plg.polyCube(whichOne, e=True,  sx = int(sizeX/sizeY))
  14. else:
  15.     print 'false'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement