Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Killing unused vertex points (https://simplymaya.com/forum/showthread.php?t=33103)

kimsay 26-09-2009 11:22 AM

Killing unused vertex points
 
1 Attachment(s)
Hi!

Is there a scrip or something to kill all the vertex points which have no "function"?

Dango77 26-09-2009 11:59 AM

Not sure about a script etc to kill the points, but for future reference, when deleting edges, use the "delete edge/vertex" tool rather than deleting them using the delete key or backspace, that way all unused vertex are deleted as you go. It's in the edit mesh drop menu, about three quarters the way down.

Hopefully someone will know a script or some other way to help get rid of those you have left at the moment!

kimsay 26-09-2009 02:07 PM

Thank you very much for your help :D Very cool. I don't need the script, but I think something like that could be useful anyway.

Cheers, kimsay

Mayaniac 26-09-2009 03:34 PM

Just select the all the verts and hit delete.. Maya will only delete verts with only 2 connection points (edges). So, as long as you don't select boarder edges, or corner geo (like the corner of a subdivided plane). you should be good to go.

Ozgalis 27-09-2009 09:59 AM

So if you were to select the mesh in vertex and deleate would it deleate the useless ones and leave the rest or just not do anything?

Mayaniac 27-09-2009 06:12 PM

Quote:

Originally posted by Ozgalis
So if you were to select the mesh in vertex and deleate would it deleate the useless ones and leave the rest or just not do anything?
It will delete all the vets with only two edges, which are, for the most part, useless. Unless it's a corner of a subdivided flat plane.

bjames8462 20-03-2019 03:19 PM

Old post I know, but if anyone needs a method other than the built in delete edge/vertex, select all the vertices in the mesh you are trying to target, then:

selected = cmds.ls(sl=1, fl=1)

cmds.select(clear=True)
for v in selected:
if len(cmds.polyInfo(v,ve=True)[0].split(" ")) == 4:
cmds.select(v,add=True)

cmds.delete(cmds.ls(sl=True))

Fiorenzo 29-03-2019 02:47 PM

Quote:

Originally Posted by Ozgalis (Post 295742)
So if you amplify the positive effects of these probiotics for women and were to select the mesh in vertex and deleate would it deleate the useless ones and leave the rest or just not do anything?

How many vertex points does this command delete?

Fynmorph 28-08-2019 09:52 PM

Quote:

Originally Posted by bjames8462 (Post 366099)
selected = cmds.ls(sl=1, fl=1)

cmds.select(clear=True)
for v in selected:
if len(cmds.polyInfo(v,ve=True)[0].split(" ")) == 4:
cmds.select(v,add=True)

cmds.delete(cmds.ls(sl=True))

Your python code doesn't work, idk why you wrote "cmds.polyInfo(v,ve=True)[0]" but it never gives 4 values.
Here's a corrected version:

Code:

#python, select target vertices first
import re
selected = cmds.ls(sl=1, fl=1)
cmds.select(clear=True)
for v in selected:
    if len( re.findall('\d+', cmds.polyInfo(v,ve=True)[0]) ) == 3:
        cmds.select(v,add=True)
cmds.delete(cmds.ls(sl=True))



All times are GMT. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018