View Full Version : Switching command panels callbacks
Swahn 09-09-2009, 10:32 AM 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!
|
|
denisT
09-09-2009, 08:59 PM
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!
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
CGTalk Moderation
09-09-2009, 08:59 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.