TRACKING OBJECTS to components using pointPosition trackSphere.mb

-Point constraining an object to the component of another object is tricky, or not easiliy possible with interface tools. You can use MEL. If you try typing pointPosition with a vertex selected of, say, a polygon shere; you will see that vertex's world coordinates are spit out in the editor...looking something similar to this: Result: -3.09086e-007 7.071068 7.071068

Let's use this feature to snap and track objects to found vertices..

-create a polygon sphere, name it baseFrame, give it radius of 10, both subdivision axis and height to 4

-create 14 NURBS spheres, and name them ns0 through ns13 , make these spheres smaller that the poly spheres (see example maya file, above/right)

enter this into the EXPRESSION EDITOR (name the expression track if you want)....

int $i, $numVerts[] = `polyEvaluate -v baseFrame`;
float $pos[3];
for($i=0; $i<$numVerts[0]; $i++)
{
$pos = pointPosition("baseFrame.vtx[" + $i + "]");
move -a $pos[0] $pos[1] $pos[2] ("ns" + $i);
}

all the NURBS spheres will snap to the verticies of the the polgygon sphere.BUT ALSO, becuase it is an expression, it the nurbs spheres will follow the points as they are animated.

Note: they will only follow the polysphere when the timeline is playing, and not when interacting with it.