This script will quickly select all of the edges in your 3d Studio Max model that boarder smoothing group changes. For example, if you have a character who’s smoothing groups change between flesh and clothing, this helps you quickly see where those changes are, and refine your smoothing groups accordingly. You can also use it to create UWV clusters based on your smoothing groups. Finally, it allows you to select all of your smoothing group boarders, or the boarders of only a particular smoothing group.
Click this link to download the Face Smoothing Group Boundaries Script. Just unzip it to your desktop or somewhere on your hard drive and run it via the Maxscript command menu in 3dsMax.
By Matt Ostgard February 1, 2011 - 11:22 pm
Awesome.. just what I needed. Thanks!
By Matt Ostgard February 2, 2011 - 12:23 am
It seems to error out on border edges.. so modified your script with just an additional if statement:
— Select Boundaries
— // A script that selects the edges of all smoothing groups.
— // Written by Mr. Bluesummers in less than 30 minutes. ^__^
— // Original Idea by Discmage
(
rollout SelectSmoothingGroupEdges “Select Smoothing Group Edges” width:200 height:100
(
fn SelectSGEdges AllOrNone TargetGroup =
(
undo on
(
try
(
local EdgeSel = #{}
local TotalEdges = PolyOp.getNumEdges $
— For each edge in the object, get the two faces.
— If they aren’t in the same smoothing group, add it
— to the selection bitarray.
for ThisEdge = 1 to TotalEdges do
(
— Get the edge faces.
EdgeFaces = PolyOp.getEdgeFaces $ ThisEdge
— Ignore border edges
if (EdgeFaces as array).count == 2 then
(
— Get their smoothing groups.
SmoothingGroup1 = PolyOp.getFaceSmoothGroup $ EdgeFaces[1]
SmoothingGroup2 = PolyOp.getFaceSmoothGroup $ EdgeFaces[2]
if (EdgeFaces as array).count == 2 then
(
if AllOrNone
then EdgeSel[ThisEdge] = SmoothingGroup1 != SmoothingGroup2
else EdgeSel[ThisEdge] = (SmoothingGroup1 == TargetGroup and \
SmoothingGroup2 != TargetGroup) or \
(SmoothingGroup2 == TargetGroup and \
SmoothingGroup1 != TargetGroup)
)
)
)
PolyOp.setEdgeSelection $ EdgeSel
redrawViews()
)
catch()
)
destroydialog SelectSmoothingGroupEdges
)
spinner SMGroup “Group ID: ” type:#integer range:[1, 32, 1] fieldwidth:32 across:2
checkbox AllOfThem “All Boarders” offset:[10, 0]
button SelectThem “Select Them!”
on AllOfThem changed state do SMGroup.Enabled = not state
on SelectThem pressed do SelectSGEdges AllOfThem.checked (SMGroup.value as integer)
)
CreateDialog SelectSmoothingGroupEdges
)
By Matt Ostgard February 3, 2011 - 6:37 am
also just noticed that sometimes it errors out if you don’t put “$.EditablePoly.collapseDeadStructures()” before inspecting anything
By John April 5, 2013 - 12:42 am
Tried this script, doesn’t work at all.
It doesn’t ‘error’ it just doesn’t do anything. using Max 2011. Wish it worked would be very helpful!