SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Lounges / Maya Basics & Newbie Lounge / Killing unused vertex points

Maya Basics & Newbie Lounge Please post in this section ONLY if your question doesn't fit in anywhere else on the forum, or if you're not sure which section it's relevant to. We also have Free streaming trial available.

Join the conversation. Reply to post
 
Thread Tools
26-09-2009, 11:22 AM   #1
kimsay
Registered User
 
kimsay's Avatar
 
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
Click image for larger version

Name:	bild 1.png
Views:	2213
Size:	22.9 KB
ID:	43027  
  Reply with quote
26-09-2009, 11:59 AM   #2
Dango77
Registered User
 
Dango77's Avatar
 
Join Date: Mar 2009
Location: London, England
Posts: 1,003
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!
  Reply with quote
26-09-2009, 02:07 PM   #3
kimsay
Registered User
 
kimsay's Avatar
 
Join Date: Feb 2008
Posts: 117
Thank you very much for your help Very cool. I don't need the script, but I think something like that could be useful anyway.

Cheers, kimsay
  Reply with quote
26-09-2009, 03:34 PM   #4
Mayaniac
As Zbrushiac sounds stupid!
 
Mayaniac's Avatar
 
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!!"
  Reply with quote
27-09-2009, 09:59 AM   #5
Ozgalis
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?
  Reply with quote
27-09-2009, 06:12 PM   #6
Mayaniac
As Zbrushiac sounds stupid!
 
Mayaniac's Avatar
 
Join Date: Nov 2007
Location: Derby
Posts: 1,241
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.
__________________
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!!"
  Reply with quote
20-03-2019, 03:19 PM   #7
bjames8462
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))
  Reply with quote
29-03-2019, 02:47 PM   #8
Fiorenzo
Registered User
 
Join Date: Mar 2019
Posts: 1
How many vertex points does this command delete?
  Reply with quote
28-08-2019, 09:52 PM   #9
Fynmorph
Registered User
 
Join Date: Aug 2019
Posts: 1
Quote:
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.
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
select all vertex points or faces Frontliner Maya Basics & Newbie Lounge 2 15-09-2010 12:52 PM
Vertex Points to small Armandz Maya Basics & Newbie Lounge 8 14-10-2008 06:42 AM
The Oliphant Tutorial bradjames Simply Maya Tutorials 13 02-08-2004 11:53 PM
Cannot see vertex or face points sorcecode Maya Technical Issues 3 11-08-2003 03:11 AM
lining up polly vertex points VAMP1Re Maya Basics & Newbie Lounge 4 04-01-2003 12:52 PM