View Single Post
Old June 19th, 2008   #4 (permalink)
Dave Buchhofer
Senior Member
 
Dave Buchhofer's Avatar
 
Join Date: May 2002
Location: Philadelphia
Posts: 300

Name: Dave Buchhofer


United_States  Send a message via AIM to Dave Buchhofer


Default Re: show maps in viewport question

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
__________________
Dave.
TD / EwingCole DMG
Dave Buchhofer is offline   Reply With Quote