Advertisement
joch1175

maya_particles.py

Oct 1st, 2020
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. # maya_particles.py
  2. import maya.cmds as cmds
  3. import gen_points
  4.  
  5. def makeCubic(num, side):
  6.     points = gen_points.cubic(num, side)
  7.     cmds.nParticle(p=points)
  8. def makeSphere (num, radius):
  9.     points = gen_points.sphere(num, radius)
  10.     cmds.nParticle(p=points)
  11. def makeCylinder(num, radius, height):
  12.     points = gen_points.cylinder(num, radius, height)
  13.     cmds.nParticle(p=points)
  14. def makeCone(num, radius, height):
  15.     points = gen_points.cone(num, radius, height)
  16.     cmds.nParticle(p=points)
  17.  
  18. if __name__=='__main__':
  19.     num = 1000
  20.     side = 5
  21.     radius = 12
  22.     height = 24
  23.  
  24.     makeCubic(num, side)
  25.     makeSphere (num, radius)
  26.     makeCylinder(num, radius, height)
  27.     makeCone(num, radius, height)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement