PDA

View Full Version : Adjusting all maps?


Seraph135
02-17-2007, 09:59 PM
I would like to write a script that would search the entire scene and look for a specific map type (lets use a mix map for example). I would like the script to then change one of the paramaters within all of those mix maps. Can someone please point me in the right direction to do this? I have looked through the maxscript help file, but I'm not exactly sure what paramaters I should be looking for.

Thanks,

Tim J

jonlauf
02-17-2007, 10:21 PM
This will change the mix amount in all mix maps to 50:

mixArray = for i in (getClassInstances mix) collect i
for i in mixArray do (i.mixAmount = 50)

Hope it helps

jonlauf
02-17-2007, 10:24 PM
you could actually do it with one line:

for i in (getClassInstances mix) do (i.mixAmount = 50)

Seraph135
02-17-2007, 11:02 PM
Awesome...Thanks Jon. Now let me throw you a curve.

How would you do the same thing with a scripted material? I've written a material called "Override" which extends a mix map. I'd like to now adjust parameters in all instances of my override material. Is this possible?

Thanks for your help!

Tim J

Seraph135
02-17-2007, 11:14 PM
Ok...I'm a fool. I discovered why I was having trouble with getting this to work. It would help if I spelled things correctly. :rolleyes:

Its working now.

Tim J

CGTalk Moderation
02-17-2007, 11:14 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.