[Closed] Toggle display topology-dependence warning on / off
How do we turn off/on the display topology-dependence warning via maxscript, or is it not possible?
I’m making a script that does alot of modifications under the top modifier in the stack, and wondering how i can disable this warning while the script is doing its thing then enable it when its done.
I know how to disable and enable it manually, but how can i do this via maxscript, or ok it automatically via maxscript?
This setting is stored in the 3dsmax.ini. You can change the .ini values at runtime, but I don’t think they will be in effect until next time you start 3dsmax.
About handling the dialog programatically, see help file or search this forum for DialogMonitorOps
fn toggleDisplayTopologyDependenceWarning =
(
fn PreferenceCallback =
(
-- [ http://forums.cgsociety.org/showpost.php?p=6973531&postcount=13 ]( http://forums.cgsociety.org/showpost.php?p=6973531&postcount=13)
fn setCheckBoxState hwnd state =
(
local BN_CLICKED = 0
local BM_SETCHECK = 241
local WM_COMMAND = 273
local parent = UIAccessor.getParentWindow hwnd
local id = UIAccessor.getWindowResourceID hwnd
windows.sendMessage hwnd BM_SETCHECK (if state then 1 else 0) 0
windows.sendMessage parent WM_COMMAND ((bit.shift BN_CLICKED 16) + id) hwnd
ok
)
hWND = DialogMonitorOPS.GetWindowHandle()
if (UIAccessor.GetWindowText hWND) != "Preference Settings" do return true
bt = windows.getchildhwnd hWND "Display Topology-Dependence Warning"
act = (getIniSetting (getMAXIniFile()) #performance #TopoMessage) as integer
setCheckBoxState bt[1] (act == 0)
UIAccessor.SendMessageID hWND #IDOK
true
)
DialogMonitorOPS.RegisterNotification PreferenceCallback id:#preferencesConfigure
DialogMonitorOPS.Enabled = true
max file preferences
DialogMonitorOPS.unRegisterNotification id:#preferencesConfigure
DialogMonitorOPS.Enabled = false
(getIniSetting (getMAXIniFile()) #performance #TopoMessage) as integer
)
/*
toggleDisplayTopologyDependenceWarning()
*/
Thanks you both, I’m not too sure how to do either of these, brand new to scripting, but i have tried your script dennis, and thank you very much, but i get this error:
– Error occurred in anonymous codeblock; filename:
– Compile error: No outer local variable references permitted here: setCheckBoxState
– In line: setCheckBoxState b