home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar Special 2002 April
/
GSSH42002.iso
/
EDITOREN
/
DS
/
gmax
/
gmaxinst_1-1.exe
/
gmaxsetup11.cab
/
Macro_PolyCounter.mcr
< prev
next >
Wrap
Text File
|
2002-02-13
|
1KB
|
55 lines
-- MacroScript File
-- Created: Sept 21 1999
-- Modified: Dec 7 2000
-- Modified: Apr 25 2001 LAM
-- Author: Fred Ruff
-- MacroScript for Turning On a Polygon counter in the viewpot on an object.
--***********************************************************************************************
-- MODIFY THIS AT YOUR OWN RISK
macroScript Poly_Counter
category:"MAX Script Tools"
internalcategory:"MAX Script Tools"
buttontext:"Polygon Counter"
toolTip:"Polygon Counter"
(
local PolyCounterOn = false
local lastViewport
fn polytext =
(
try
(
if viewport.activeViewport != lastViewport do
( completeredraw()
lastViewport = viewport.activeViewport
)
viewtext = ""
if selection.count == 1 do
( if getCommandPanelTaskMode() == #modify and subobjectlevel == 1 then
viewtext = "Vertices: " + (getPolygoncount $)[2] as string
else
viewtext = "Triangles: " + (getPolygoncount $)[1] as string
)
gw.wtext [5,40,1000] viewtext color:(color 255 234 0)
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
catch ()
)
on ischecked return PolyCounterOn
On execute do
( if PolyCounterOn then
unregisterRedrawViewsCallback polytext
else
registerRedrawViewsCallback polytext
PolyCounterOn = not PolyCounterOn
completeredraw()
updateToolbarButtons()
)
)