close
Get in touch with us
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
asdfdsfds
Automatic Hard Edges in Maya Blog Banner
Autodesk Maya

Play Creative |  07/05/19

Share


Free Script - Finding Hard Edges in Maya
An easy way to find hard edges for Beveling/Fencing


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!


Video Tutorial


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.

⬇ Download as .txt file
///////////////////////////////////////////////////////////////
//SELECT HARD EDGES
//Author : www.playcreative.io
//Date : 01/05/18
//Version : 1.1
///////////////////////////////////////////////////////////////
source dagMenuProc;
int $lowAngle = 30;
int $highAngle = 150;
//Change the object back to object mode, just in case it wasn’t already
toggleSelMode;
changeSelectMode -object;
//Store the object that is selected
string $curSel[] = `ls -sl`;
//Select all edges and store in an Array list
doMenuComponentSelectionExt($curSel[0], "edge", 0);
int $edgecount[] = `polyEvaluate -e $curSel[0]`;
select ($curSel[0] +".e [0:" + ($edgecount[0] - 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");
////////////////////////////////////////////////////////////////
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Discover More  Articles...