Page 1 of 1

MaxScript - multisubmaterial Emissions

Posted: Tue Oct 11, 2016 10:38 am
by stir
Hi as the subject line says.
I want to controll the emission slot of a diffuse octane material with maxscript.

So far i got this.

for a = 1 to meditMaterials[7].numsubs do
(
meditMaterials[7].materialList[a].emission = Texture_emission ()
)


This will add a texture emission in the emission slot of all the materials in the multisub material that is located in slot 7 in the compact editor.
This works fine.

Then i try to flipp it. now i want to remove them. What you usualy do then, is say undefined instead of texture_emission

for a = 1 to meditMaterials[7].numsubs do
(
meditMaterials[7].materialList[a].emission = undefined
)


but this gives me a

** system exception **

Error.

Anyone knows what i have done wrong here?


best regards
-Mats