Lost Adventurer, Aleks Kirilenko (3D)
LC #42 Pipers Alley

View Full Version : select vertices by attribute values...

04-11-2003, 04:01 PM
There is a way to select a list of objects or components by an attribute value?
Example: i want to select a particular list of vertices in a poly object that has a the same x and y values, defined by a string.
Hope this is possible and thanks in advance for possibly replies.


04-11-2003, 05:25 PM
The best way is to list all of the object's vertices and then loop over them, testing as you go:

string $object = "nurbsSphere1";

string $vertices[] = `ls ($object + (".cv "))`;

for ($currvert in $vertices) {
// test their attributes in here

Note that in your case you do NOT want your test to be simple equality, because two vertices may have insignificantly different numerical values yet be so close that you want to treat them as being at the same location. You should really test for their proximity to each other.

-- Mark

04-12-2003, 12:36 PM
Thanks a lot Mark, i give it a try now...


CGTalk Moderation
01-14-2006, 10: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.