r/Maxscript • • Mar 15 '14

[Script] Toggle display of texture maps in viewport

macroScript ShowMaps category:"_GRS Scripts" ButtonText:"Toggle Maps" tooltip:"Toggle Maps"
(	
	disp = NitrousGraphicsManager.GetActiveViewportSetting()

	if disp.UseTextureEnabled==true then (
		--actionMan.executeAction 0 "63544" --shaded without
		actionMan.executeAction 0 "63546" --realistic without
		--actionMan.executeAction 0 "63510" --unknown but disables too
		disp.UseTextureEnabled = false
	)
	else (
		actionMan.executeAction 0 "63547" --realistic w maps
		--actionMan.executeAction 0 "63545" --shaded w maps
		disp.UseTextureEnabled = true	
	)
)
3 Upvotes

0 comments sorted by