Mel question

Hello all,

I’m trying to accomplish something with Mel and I’m wondering if anyone can give me some insight, or atleast point me in the right direction.

Bascially, I want to draw a CV curve on a “Live” surface. The user will input the x, y and z of all the points of a curve. I want each point to snap to the closest part of the “live” mesh. Originally I throught it would do this automatically when the curve is created, but it doesn’t, it just ignores the live mesh. I hope that makes sense.

Thanks for any help!!
-Jason

Hey Jason,

What you are after is the nearestPointOnMesh plugin, it’s off by default. It’s located in the standard Maya plugins list from at least 8.5.

Turn that baby on run:

createNode nearestPointOnMesh;

It takes an outMesh & position and pops out a position, normal, parametric UV and nearest face index.

It should have everything you need to get you on your way. :D:

~Butters)