--**************************************** Autorun CustomStatistic ***************************************** -- -- Created: 18-03-2017 -- Version 1.00 (for 3ds max 2009 (10) and up) -- Author : Dmitry Ladeynov () -- -- Install: Copy to 3ds Max directory scripts\Startup -- -- Example: Copy to C:\Program Files\Autodesk\3ds Max 2014\scripts\Startup -- -- Default mode: -- -- Total Selection -- Polys: x x -- Tris: x x -- Verts x x -- -- FPS: x -- --****************************************************************************************************** -- Run Statistic max show statistics toggle -- Change Statistic dialogMonitorOPS.UnRegisterNotification id:#ChangeStatisticID dialogMonitorOps.enabled = true function ChangeStatistic = ( local enable = 1 local disable = 0 local curMaxVersion = ((maxversion())[1] / 1000) local statisticsTabIndex = if curMaxVersion > 14 then 6 else 5 local hwnd = DialogMonitorOPS.GetWindowHandle() local hwnd_title = UIAccessor.GetWindowText hwnd if (hwnd_title == "Viewport Configuration") then ( for kidHWND in (UIAccessor.GetChildWindows hWND) where ((UIAccessor.GetWindowClassName kidHWND) == "SysTabControl32") do ( UIAccessor.SendMessage kidHWND 0x1330 statisticsTabIndex 0 ) controls = windows.getChildrenHWND hwnd for child in controls do ( if (child[5] == type) do show = child if (child[5] == "Total") do (UIAccessor.SendMessage child[1] 241 disable 0) if (child[5] == "Selection") do (UIAccessor.SendMessage child[1] 241 disable 0) if (child[5] == "Total + Selection") do (UIAccessor.SendMessage child[1] 241 enable 0) if (child[5] == "Polygon Count") do (UIAccessor.SendMessage child[1] 241 enable 0) if (child[5] == "Triangle Count") do (UIAccessor.SendMessage child[1] 241 enable 0) if (child[5] == "Edge Count") do (UIAccessor.SendMessage child[1] 241 disable 0) if (child[5] == "Vertex Count") do (UIAccessor.SendMessage child[1] 241 enable 0) if (child[5] == "Frames Per Second") do (UIAccessor.SendMessage child[1] 241 enable 0) ) UIAccessor.PressButtonByName hwnd "OK" ) true ) dialogMonitorOPS.RegisterNotification ChangeStatistic id:#ChangeStatisticID max vptconfig dialogMonitorOPS.UnRegisterNotification id:#ChangeStatisticID dialogMonitorOps.enabled = false