[Closed] Add TurboSmooth to many Objects
Hello,
I have a rather big issue that I would love to get some help with. I have about 870 objects in one of my 3ds max scenes (editable poly) that I need to add TurboSmooth modifiers to. To add the modifier to just ONE object at the time are no problems with maxscript, but if I select 2 objects or more, I get an error. I need to have the TurboSmooth set to use RenderIterations and also set the RenderIterations to 2 on ALL objects.
My current script is this:
rollout Toolbox “Toolbox”
(
button ‘btnGO’ “Turbosmooth & Center Pivot”
on btnGO pressed do
(
modPanel.addModToSelection (TurboSmooth ()) ui:on
$.modifiers[#TurboSmooth].iterations = 0
$.modifiers[#TurboSmooth].useRenderIterations = on
$.modifiers[#TurboSmooth].renderIterations = 2
centerpivot $
)
)
createDialog Toolbox
I guess I need to collect all selected objects in a array then add it that way maybe, but scripting isn’t the strongest side of me sadly.
Are there any way I can do this, because I don’t have the time/will to sit and select one object, press the button on my script, then select next object and press the button again, 870 times… :banghead:
Thanks for any kind of help here!
Regards
rollout Toolbox "Toolbox"
(
button 'btnGO' "Turbosmooth & Center Pivot"
on btnGO pressed do
(
modPanel.addModToSelection (TurboSmooth ()) ui:on
for s in selection do
(
s.modifiers[#TurboSmooth].iterations = 0
s.modifiers[#TurboSmooth].useRenderIterations = on
s.modifiers[#TurboSmooth].renderIterations = 2
centerpivot s
)
)
)
createDialog Toolbox
It might be improved, you can check if some object are instances, then you don’t nedd to apply twice turbosmooth
Ahhh, big thanks for fast reply and for a easy fix, didn’t think it was that easy
If there are no instances, this will be enough:
addModifier selection (TurboSmooth iterations:1 renderIterations:2 useRenderIterations:on)
centerPivot selection