Free Script - Finding Hard Edges in Maya
Sometimes when creating hard surface models in Maya you'll need to find a quick way to fence/hold edges or bevel/crease them to create higher resolution models.
The slowest part of this is often selecting the hard edges to begin with - here's where a Hard Edges script can help speed up your workflow dramatically. (Shout out to those artists who requested access to it!)
By finding only the hard edges of a certain angle on your model, you can near-immediately make a high res version of your model, saving you a heap of time you can spend elsewhere.
Download the code text below and watch the video to get started!
Script text to copy
Copy the below text or download as a txt file.
Note - Some browsers can sometimes alter the linebreaks or quotation marks when you copy/paste.
//SELECT HARD EDGES
//Author : www.playcreative.io
//Date : 01/05/18
//Version : 1.1
int $lowAngle = 30;
int $highAngle = 150;
//Change the object back to object mode, just in case it wasn’t already
//Store the object that is selected
string $curSel = `ls -sl`;
//Select all edges and store in an Array list
doMenuComponentSelectionExt($curSel, "edge", 0);
int $edgecount = `polyEvaluate -e $curSel`;
select ($curSel +".e [0:" + ($edgecount - 1) + "]");
//Constrain that selection to only edges of a certain Angle
polySelectConstraint -m 3 -a on -t 0x8000 -ab $lowAngle $highAngle;
//Remove the selection constraint so everything back to normal
polySelectConstraint -m 0;
print ("Hard edges between " + $lowAngle + " and " + $highAngle + " degrees have been selected");