PDA

View Full Version : max script help


Iconized
01-25-2008, 01:27 PM
I am in need of a simple bit of max script to turn on and off the mask in a blend material but it needs to skip normal un masked/ unblended materials, work on the the materails in the entire scene, that are both top level and embeded in a multi sub material and if possible toggle all the blended materal masks in a scene so they can either be on or off

I am prepared to pay for this to get the script i need

please send me a pm if you can help

Si

MoonDoggie
01-25-2008, 04:10 PM
PM sent.

-Colin

focomoso
01-25-2008, 09:28 PM
you mean something like this:


fn checkMat mat state = (
if classof mat == blend then
mat.maskEnabled = state

for i = 1 to getNumSubMtls mat do
checkMat (getSubMtl mat i) state
)

fn setAllBlendMasks state = (
for m in scenematerials do (
checkMat m state
)
)

setAllBlendMasks false


call 'setAllBlendMasks true' to turn them on. false for off.

Kameleon
01-25-2008, 10:43 PM
focomoso, that almost does the trick, but when turning on it will be turning on all blended materials and not only the ones previously turned off, it would be convinient to save a temporary material library and then when turning on the masks, compare by name the blended materials in the temp matlib with the current scene materials and if the blended mat in the temp matlib is enabled then turn on the corresponding mat in the scene. I already did something similar but I dont have Max here right now, but should be easy to implement. Cyas and good luck.

CGTalk Moderation
01-25-2008, 10:43 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.