Introduction to Maya - Modeling Fundamentals Vol 1
This course will look at the fundamentals of modeling in Maya with an emphasis on creating good topology. We'll look at what makes a good model in Maya and why objects are modeled in the way they are.
# 1 26-09-2009 , 11:22 AM
kimsay's Avatar
Registered User
Join Date: Feb 2008
Posts: 117

Killing unused vertex points

Hi!

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

Attached Thumbnails
# 2 26-09-2009 , 11:59 AM
Dango77's Avatar
Registered User
Join Date: Mar 2009
Location: London, England
Posts: 1,009
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!

# 3 26-09-2009 , 02:07 PM
kimsay's Avatar
Registered User
Join Date: Feb 2008
Posts: 117
Thank you very much for your help user added image Very cool. I don't need the script, but I think something like that could be useful anyway.

Cheers, kimsay

# 4 26-09-2009 , 03:34 PM
Mayaniac's Avatar
As Zbrushiac sounds stupid!
Join Date: Nov 2007
Location: Derby
Posts: 1,241
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.


www.stevenegan-cgi.com

"Your weapons are no match for ours! People of Mars, surrender!"
"Um, this isn't Mars. This is Earth."
"Earth? Earth-with-nuclear-weapons Earth?"
"Yes."
[long pause] "Friend!!"
# 5 27-09-2009 , 09:59 AM
Events Team at Wargaming.net
Join Date: Dec 2008
Location: Crystal Lake, Illinois
Posts: 486
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?

# 6 27-09-2009 , 06:12 PM
Mayaniac's Avatar
As Zbrushiac sounds stupid!
Join Date: Nov 2007
Location: Derby
Posts: 1,241

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.


www.stevenegan-cgi.com

"Your weapons are no match for ours! People of Mars, surrender!"
"Um, this isn't Mars. This is Earth."
"Earth? Earth-with-nuclear-weapons Earth?"
"Yes."
[long pause] "Friend!!"
# 7 20-03-2019 , 03:19 PM
Registered User
Join Date: Mar 2019
Posts: 1
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))

# 8 29-03-2019 , 02:47 PM
Registered User
Join Date: Mar 2019
Posts: 1


Last edited by Fiorenzo; 02-10-2023 at 02:34 PM.
# 9 28-08-2019 , 09:52 PM
Registered User
Join Date: Aug 2019
Posts: 1

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))


Last edited by Fynmorph; 18-09-2019 at 03:05 PM.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads