[Closed] maps Substitution
Hi!
I’m working on a script that does this:
-Locate any colorcorrect map and substitute it for its source bitmap.
I would like to know if its possible to use a different method than iterate through the material list. It’s problematic because there are LOT of different material structures…
Maybe I could know what the parent of any map is, and get them from a “getclassinstaces(colorcorrect)” array??
Really noob to coding, so I accept suggestions…
Thanks in advance…
Hi,
you should look into ‘getClassInstances’ and ‘replaceInstances’ or ‘instanceReplace’ (one of them will do the trick, the other won’t, I can’t remember which one is which) in the mxs help
the basic idea is to loop through all the instances of the map class you want to alter (in your case ‘colorcorrect’) and replace it with the other map you want which should be easy to get from the first.
good luck
It worked perfectly, thanks a lot!!!
the code, maybe someone find it useful:
s = getclassinstances(colorcorrect)
for i in s do
(
replaceinstances i i.src_tex
)
Hmmm, thanks for that, was searching for something like this a while back and didn’t find anything… This will be very useful thankyou.
how about replacing with no map (i.e clearing the channel map ) which may be not inside fallof or any other compound forms of material?