Calling Vertices numbers

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 11 November 2007   #1
Calling Vertices numbers

Hi,
Is there a way to get a selected Vertex number only? Or do I need to use match and substituteAllStrings to get the clean number?
__________________
______________________________________
______________________________________
don't worry IK Handle this!
 
Old 11 November 2007   #2
Thumbs up


global proc int[] getVertInt( string $verts[] )
{
	string $curSel[] = `ls -sl`;
	select -r $verts;
	string $myVerts[] = `ls -sl`;
	string $vertList[] = `filterExpand -sm 31 -ex true`; //poly verts

	int $intVerts[] = {}; 
	for( $vert in $vertList )
	{
		string $buffer[] = {};
		$n = `tokenize $vert "[]" $buffer`;
		string $nVertStr = $buffer[1];
		int $nVert = $nVertStr;
		$intVerts[size($intVerts)] = $nVert;
	}
	select -r $curSel;
	return $intVerts;
}

//test asset
string $obj[] = `polySphere -ch on -o on -r 8.904493`;
select -r ($obj[0]+".vtx[2]");
select -add ($obj[0]+".vtx[10]");
select -add ($obj[0]+".vtx[4]");
string $verts[] = `ls -sl`;

//call my function to get ints back
int $vertNums[] = getVertInt( $verts );

print $vertNums;
 
Old 11 November 2007   #3
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 01:59 PM.


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