View Full Version : Getting xyz data for every vertex selected
nelsonteixeira 06-30-2003, 01:34 PM How do I make a list of the transformation data for the selected vertexes in a poligon object???
example: If I select vertexes from 30 to 40, and need to know what are their location in world space??? So I could edit theses vertexes position and copy this tweak to other face targets.
|
|
alexx
06-30-2003, 02:29 PM
the commands you need for that are e.g.:
- filterExpand
and
- xform
cheers
alexx
sedric
06-30-2003, 04:42 PM
try looking up the pointPosition command in the help files. it works well for finding the coordinates for vertices.
hope this helps,
sedric
mhovland
06-30-2003, 05:10 PM
Take a look at my copy/paste vertex positions script at Highend3d
http://www.highend3d.com/files/dl.3d?group=melscripts&file_loc=mh_copyVertPos-v1.1-.mel&file_id=1833
dstripinis
06-30-2003, 05:20 PM
// get the selection list
string $selVerts[] = `ls -flatten -selection `;
// use a for loop to query the value of each vertex
// I then assign the values to a vector array. I do this
//for easy tracking.
vector $vPos[];
for ( $each in $selVerts ) {
float $tmpF[] = `xform -query -worldSpace -translation $each`;
$vPos[`size $vPos`] = << $tmpF[0] ,$tmpF[1] ,$tmpF[2] >>; }
now each index of $vPos will hold the co-ordinates of the vertex in the corresponding index of $selVerts
You can also use pointPosition command.
pointPosition -l pCube1.vtx[0];
( thank to strarup for helping me at same problem )
CGTalk Moderation
01-15-2006, 12:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.