Code:
sel = selection as array
for n = 1 to sel.count do
(
if classof sel[n].material == Multimaterial then
(
for i in 1 to sel[n].material.numsubs do
(
sel[n].material.materiallist[i].showinviewport = true
)
)
else
(
sel[n].material.showinviewport = true
)
)
to turn them ON for the selected objects.. or replace true with false to turn them OFF.. no error checking or anything, and probably chokes on a few non-standard(orvray) material types, but a start
