CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 05-11-2007, 01:22 PM   #1
ehmdjii's Avatar
Join Date: Dec 2002
Posts: 141
number of vertices in a mesh


i just want a little script that gives me all the vertices from a mesh in maya 8.5.

but when i run the following on a mesh consisting just of three triangles (5 vertices) i get 26 vertices.

$verts = "myShape.vtx";
print (size($verts));

i guarantee the mesh has only 5 vertices and if i look at the vertices more closely, they look like this:

vert 0 ( 0.4971784949 0.0122718811 )
vert 1 ( 0.9999041557 0.01259565353 )
vert 2 ( 1.000000119 0.9877278805 )
vert 3 ( 9.161233902e-005 0.01259350777 )
vert 4 ( 1.192092896e-007 0.9877278805 )
vert 5 ( 1.192092896e-007 0.9877278805 )
vert 6 ( 1.192092896e-007 0.9877278805 )
vert 7 ( 1.192092896e-007 0.9877278805 )
vert 8 ( 1.192092896e-007 0.9877278805 )
vert 25 ( 1.192092896e-007 0.9877278805 )

you can see that starting from the 6th vertex, all values are the same.
these are the UVs for example.

where is the problem?
how can i get the correct number of vertices on a mesh?

thanks a lot!
Old 05-11-2007, 01:34 PM   #2
Yes, I Listen...
alexx's Avatar
Technical Director / 3D Artist
Join Date: Feb 2002
Posts: 2,202
no idea what the command really returns.

what you are looking for is:

polyEvaluate -v

that one returns the correct values


"A computer program does what you tell it to do, not what you want it to do." Greer's Third Law.
Old 05-11-2007, 01:41 PM   #3
ehmdjii's Avatar
Join Date: Dec 2002
Posts: 141
thank you!
Old 05-11-2007, 01:41 PM   #4
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
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 12:55 PM.

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