Hi all,
I'm new here and also scripting.
I was working on a script to apply random materials from a material library to the selected objects.
I made a button that activates the option 'show in viewport' to the diffuse map.
My problem is that when I have multi-sub materials the show map in viewport doesnt work.
In max help it says I need to create an index to call every material in the multi-sub material.
Can anybody help me how I can I do that?
This is the code I have:
on show pressed do
(
selobjs = $
for i in 1 to selobjs.count do
(
showTextureMap selobjs[i].material selobjs[i].material.diffusemap on
)
)
Thanks a lot.
King Regards
Christopher Grant · 2008-10-30