[Closed] Replacing one map with another
I can think of several dirty ways to do this, but I wanted to check to see if there’s a simpler way to make this happen.
Say I have 10 noise maps in my scene, and I want to replace them all with gradients. I can run through the scene and find all 10 noises with maxscript, is there a function to then take these and swap them with the new map?
- Neil
replaceInstances <old_MAXWrapper> <new_MAXWrapper> transferCAs: <bool>
Replaces all instances of the old MAXWrapper with the new MAXWrapper. Old and new MAXWrapper must have the same superclass.
WARNING: Minimal error checking, use with extreme caution.
more specifically
for c in getClassInstances oldclass do
(
replaceInstances c (newclass())
)
Thanks Vojtech, I had forgotten that that function works also on maps (a lot of things really), I’ve used it for objects but not for other stuff.
- Neil