MaxScript - multisubmaterial Emissions

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
Post Reply
stir
Licensed Customer
Posts: 101
Joined: Sun Apr 10, 2016 7:12 am

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
------------------------------------------------------------------------------

http://www.stir.no
Post Reply

Return to “Autodesk 3Ds Max”