Notifications
Clear all

[Closed] Switching command panels callbacks

Hi, i’ve tried to search the Maxscript reference for a solution but i fail to find any.

I need to create a callback, or whatever workaround there is, that trigger whenever the user is changing the active command panel. I essentially need a way to trigger a function whenever the user leaves the modify panel (to disable elements on custom epoly-only tools.)

Thanks for any help!

1 Reply
1 Reply
(@denist)
Joined: 1 year ago

Posts: 0

in your case only that you need to know is a current object in modpanel… If it’s editable poly or edit poly modifier your tools can work. Am I right?

use modPanelObjPostChange callback:


fn isPolyEditMode = 
(
 obj = modpanel.getCurrentObject()
 iskindof obj Editable_Poly or iskindof obj Edit_Poly 
)
callbacks.removeScripts id:#check_poly
callbacks.addScript #modPanelObjPostChange "isPolyEditMode()" id:#check_poly