SHARE
TWEET

Proportionizer 0.0.1

jeffwincek Oct 4th, 2011 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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'
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. OK, I Understand
 
Top