View Single Post
# 1 06-11-2004 , 08:57 PM
Forlax's Avatar
Subscriber
Join Date: Aug 2003
Location: Middlesbrough, UK
Posts: 73

Vertex Positions in MEL commands

Does anybody know how to get the global position of a vertex on an object using mel scripting.

I tried this:

float $VtxPos[] = `polyMoveVertex -q -t $objName.vtx[0]`;

The script doesn't complete and seems to just hang.

I know this because the script should create a cone at the end of the script.

Come to think of it, I'm actually trying to find the centre of a face. My method is to get the three vertices of the face and average them.

Perhaps somebody knows how to do this and save me a job.

I assume objectCenter is for objects only. (I already tried it without sucess).

Thanks.

Forlax.