View Full Version : get ID of Nurbs CV point?

08 August 2007, 03:24 PM
Hi there!
My question is:
I have nurbs sphere and select one (or several) of Control Vertex:
string $cv_points[]=`ls -sl -fl`;
the result is (for example)[12][28]
so, how I can obtain the ID's of CV (12,28) and put their on different variables.
thanks in advance!

08 August 2007, 06:20 PM
$cvs = `filterExpand -sm 28`;
string $buffer[];
int $cv1_list[] = {}, $cv2_list[] = {};

for( $cv in $cvs )
$numTokens = `tokenize $cv "[]" $buffer`;
$cv1_list[size($cv1_list)] = $buffer[1];
$cv2_list[size($cv2_list)] = $buffer[2];

print ("selected cv: \n");
print ($cv1_list[$i]+"\n");
print ($cv2_list[$i]+"\n\n");

CGTalk Moderation
08 August 2007, 06:20 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.