CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 10-13-2004, 04:38 AM   #1
New Member
Join Date: Oct 2004
Posts: 2
problem to list my selection on vertex

string $sel[] = `ls -sl`;

int $numsel = size($sel);


print $sel;


print $numsel;




i'm selected 4 vertex on my object n the result only show 2.

can anyone tell me what mistake i've made??


Old 10-13-2004, 05:54 AM   #2
Panupat's Avatar
Panupat Chong
Join Date: Feb 2004
Posts: 1,942
to get vertices name, use `ls -sl -flatten`
Old 10-13-2004, 04:29 PM   #3
New Member
senior animator
Join Date: Aug 2002
Posts: 10
Send a message via ICQ to flyaway3d Send a message via Yahoo to flyaway3d
hi Panupat... `ls -sl -fl` works. thanks. but now i'm having a new problems. when i list down the vertex i selected. it deosn't follow my selection order. which means, when i select vtx[1], vtx[10] and vtx[5], it will list down vtx[1],vtx[5],vtx[10].

how can i list down the vertex number follow my selection order??
Old 10-13-2004, 07:21 PM   #4
MEL Monkey
mhovland's Avatar
Mike Hovland
Technical Artist
Chicago, USA
Join Date: Feb 2002
Posts: 580
You can't. There have been discussions on ways to do this by monitoring the undo que, and rebuilding the list from that, but it is difficult and hacky, at best.

Look at this thread:

There is code in there to return the component selection in the the order you selected them.
mike hovland
lead technical artist

Life beats down and crushes the soul... art reminds you that you have one. - Stella Adler
Old 10-14-2004, 02:40 AM   #5
Join Date: Aug 2004
Posts: 146
This thread is what I've been searching for.
I used scriptjob instead of undobuffer, and it did't work well.
Now I got answer for this.

Thank you for your good imformation mhovland
sorry for my bad English. ush
Old 01-19-2006, 01:00 PM   #6
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,479
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Society of Digital Artists

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

All times are GMT. The time now is 06:36 PM.

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