vertex positions ws on objects

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2006   #1
vertex positions ws on objects

I know how to list vertices world position on an object when the vertices are selected in component mode, but how do you query them based on an objects name only?

So i have pCube1 selected in object mode, now list me all the vertices world space cords..

Any help appreicated.
 
Old 04 April 2006   #2
Lists vtx positions for all selected objects. Hope thats what you've been looking for.
Keep in mind tho that these values are NOT including tweaks. So if you have tweaks and want the correct position you need to query the pnts too and add it to the vrts value.

string $objs[];
  int $vtxCount[];
  $objs = `selectedNodes -do`;
  for( $obj in $objs )
  {
  	$vtxCount = `polyEvaluate -v $obj`;
  	print( eval( "getAttr " + $obj + ".vrts[0:" + ($vtxCount[0]-1) + "];" ) );
  }

Last edited by tciny : 04 April 2006 at 10:26 PM.
 
Old 04 April 2006   #3
Post

this is simple question

select the polygon object and run the script

 
$obj = `ls -sl`;
$vtxCount = `polyEvaluate -v $obj[0]`;
for ($i = 0; $i <= $vtxCount[0]; $i++) {
print ("-----"+$i+"-------\n");
print `xform -q -t -ws ($obj[0]+".vtx["+$i+"]")`;
}
__________________
www.infofillers.tv - Behance

Last edited by Firas : 04 April 2006 at 06:04 AM.
 
Old 04 April 2006   #4
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:35 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.