Hello I'm beginner in MaxScript and I writed a little script to automatically apply an auto-smooth on only one selected object.
But I would like to make it working on a selection of several objects.
Maybe it's also possible to improve the syntax because I'm not sure is the best way to write this script.
Thanks for your help !
(
bob=selection
sel=bob as array
if sel.count !=1 then
(
messageBox "select only one object"
)
else
(
if classof $.modifiers[1] != Edit_Poly then
(
modPanel.addModToSelection (smooth autosmooth:true threshold: 10) ui:on
)
else
(
numFaces = polyop.getNumfaces $
subobjectLevel = 4
$.modifiers[#Edit_Poly].autoSmoothThreshold = 10
$.modifiers[#Edit_Poly].SetSelection #Face #{1..numFaces}
$.modifiers[#Edit_Poly].ButtonOp #Autosmooth
$.modifiers[#Edit_Poly].SetSelection #Face #{}
subobjectLevel = 0
)
)
)
By henrard.stephane · 2013-01-17
Anubis · 2013-01-17
barigazy · 2013-01-17