Hello all,
I have been trying to find this through google and have had no luck in getting a working script.
I would like a script that does the following:
-Enters edge selection mode on the selected object (if it is not already active)
-Selects all the hard edges
-Any selection constraints are then reset back to normal
Would anyone happen to have something like this or be able to write it?
"Select using constraints" menu is very clunky, for such a simple action.
Thankyou in advance!
Replies
import maya.cmds as cmds
cmds.polySelectConstraint(m=3, t=0x8000, sm=1)
MEL:
polySelectConstraint -m 3 -t 0x8000 -sm 1;
I don't think you would need to reset constraints after this.
http://download.autodesk.com/global/docs/maya2014/en_US/CommandsPython/
CTRL+F "polySelectConstraint"
This might be what you're looking for:
https://youtu.be/3hSMOWdhfcs
That works except it then leaves me in selection constraints mode, forcing me to open up the menu and turn it off
Yes it works!
Thank you guys for taking the time to help me with this, I will be saving this into my scripts collection.
I have been trying out the "quad chamfer by smoothing groups" workflow within Maya and the tool works well, but using selection constraints several times a minute was a pain in the ass.
Cheers
I have it on a shelf button. I have a double click variant which selects based on edge angle (85 to 95 degrees) rather than hard edges, this is handy for when Maya does an operation such as an extrude that creates all hard edges, even if the angle is <90 degrees.
Hi, I hope it would be helpful for new artists. I figured it out and it's working with Maya 2017 also.
You can use this command or here is the new link for Maya 2018 and 2019.
https://lesterbanks.com/2019/05/free-script-automatically-finds-hard-edges-in-maya/