Notifications
Clear all

[Closed] Apply MeshSmooth to selected faces

Hi all.

Ok, maybe this is a total silliness but I’ll take the risk.

I’m trying to apply a MeshSmooth modifier to a group of selected faces through MAXScript. I think this script should do the job:

Box name:"MyBox"
select $MyBox
max modify mode
addModifier $MyBox (Mesh_Select())
subObjectLevel = 3
setFaceSelection $MyBox #(6)
--completeRedraw()
modPanel.addModToSelection (MeshSmooth iterations:3 isolineDisplay:false ignoreSel:false sepBySmGroups:true)

But for some reason, when I apply the MeshSmooth modifier to the selection, the face selection I previously did in the Mesh_Select Modifier is reset, so the MeshSmooth doesn’t affect the model at all.

Any ideas of what could be causing this?.

Thanks.

2 Replies

To set the face selection in the MeshSelect modifier, you have to pass it as second argument:


b = box name:"MyBox"
ms = Mesh_Select()
addModifier b ms
max modify mode
select b
subObjectLevel = 3
setFaceSelection b ms #(6)
modPanel.addModToSelection (MeshSmooth iterations:3 isolineDisplay:false ignoreSel:false sepBySmGroups:true)

I totally missed that argument. Thanks a lot!. :applause: