Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select Edgeloop after bevel with mel

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
884 Views, 2 Replies

Select Edgeloop after bevel with mel

I'm trying to write a script that creates a cutline automatically

 

given an edgeloop 

 

1 runs a bevel with 3 segments,

2 selects the middle edgeloop 

3 runs a polymovefacet on the selection with a bit of Z offset to give the inset/bevel and creating the cutline 

 

I know how to do 1 and 3 but I don't know if there is a way to select a specific/middle edgeloop after the initial bevel? 

 

2 REPLIES 2
Message 2 of 3
sean.heasley
in reply to: Anonymous

Hi @Anonymous

 

You might find polyDuplicateEdge or polySplitRing useful.  Those are the nodes you get when you use the Offset Edge Loop or Insert Edge Loop tools.

 

Also, here's a little script that uses offset twice that may help you

 

{
polyDuplicateEdge -offset 0.5;
polyDuplicateEdge -offset 0.3;
string $edges[] = `polyListComponentConversion -fromEdge -toEdge`;
select `polyListComponentConversion -fromEdge -toFace`;
polyMoveFacet -localTranslateZ -0.05;
polyDelEdge -cleanVertices true $edges;
}

 

Please let me know if this helps or if you need any more assistance!

 

 

If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

 

Kudos are greatly appreciated. Everyone likes a thumbs up!

 

 

Message 3 of 3
Anonymous
in reply to: sean.heasley

that's very helpful thank you, I found this piece of code to work perfectly: 

 

from pymel.core import *
edges = ls(sl=True)
polyDuplicateEdge(edges, of=0.05)
faces = polyListComponentConversion(fe=True,tf=True)
polyExtrudeFacet(faces, keepFacesTogether=True, thickness=-0.5)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report