ScriptSpot

Forum topic · General Scripting

Change modifier

By kimarotta · 2012-06-25

Description

Hi all...

Anyone Know how do I change one modifier in other modifier in all objects ?

P.s - I change all modifiers in scene of "MeshSmooth" to "TurboSmooth"

Thanks

Comments (3)

Do it like this

barigazy · 2012-06-25


objArr = #()
for o in objects where o.modifiers.count != 0 do
(
for m in o.modifiers where classof m == TurboSmooth do append objArr o
)
for o in objArr do
(
for m = o.modifiers.count to 1 by -1 where classof o.modifiers[m] == meshsmooth do
(
deleteModifier o m
)
addmodifier o (TurboSmooth())
)

kimarotta · 2012-06-25

Hey Barigazy.... very thanks is perfect... and very useful...

yes its like this

3dtoall · 2016-09-21

hi it really works.I have used this in my code.thanks!