title: Creating hair follicles at selected vertices
body: <p>I'm trying to write a code that creates <code>hair follicles</code> in Autodesk Maya at the selected vertices, my code works, but it creates all the follicles at the same vertex when I have more than one selected.</p>
  
  <pre><code>import maya.cmds as cmds
  
  sel = cmds.ls( sl = 1, fl = 1 )
  
  for i in sel:
      pp = cmds.pointPosition( sel[ 0 + 1 ], w = 1 )
      fol = cmds.createNode( 'follicle' )
      cmds.move( pp[ 0 ], pp[ 1 ], pp[ 2 ], fol )
  </code></pre>
  
  <p>My logic is that when it loops back around for the second selected vertex the <code>pointPosition</code> will find the location of that vertex, create the node, and move it there. Could you tell me what I'm doing wrong?</p>
  
  <p>Thanks!</p>