I am trying to write a mel script that assigns a CV curve (with 5 knots) to each vertex on an animated object. For each vertex on the animated object the base of a single CV curve is then aligned using the constraints in order: geometry, normal (with length of CV curve aligned with normal direction), and point on poly. After this each of the CV curves are made dynamic in the nHair module, with the base anchored to the vertex on the animated object. I have been able to record the mel commands for a single instance of this but do not know how to repeat the same command for all vertices on the animated object.
As an example, I want to end up with something that looks like a poly sphere with the normal per vertex showing (all pointing away from the centre) - except that instead of normals they are CV curves
hope this makes sense