Skip to content

Instantly share code, notes, and snippets.

@taikomatsu
Created June 15, 2015 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taikomatsu/a57407ddbae0c48f1d4a to your computer and use it in GitHub Desktop.
Save taikomatsu/a57407ddbae0c48f1d4a to your computer and use it in GitHub Desktop.
Make particles from selected mesh vertices
# make particles from selected mesh vertices
from pymel.core import *
vtxs = [PyNode(o) for o in filterExpand('%s.vtx[*]' % selected()[0].name(), sm=31)]
points = []
for o in vtxs:
points.append(o.getPosition())
particle(p=points, c=1)
print('# done')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment