MayaSelectionMode MAXScript [toggle on/off]

Hey guys i'm new to maxscript and was wondering can someone help me to make this lines of code working as a script. Tnx in advance!

-- Maya Selection Mode ON
MouseConfigManager.MayaSelectionMode = true
-- Maya Selection Mode OFF
MouseConfigManager.MayaSelectionMode = false
-- Toggle Maya Selection Mode
MouseConfigManager.MayaSelectionMode = not MouseConfigManager.MayaSelectionMode

P.S ..ooops I figured it out. Tnx anyway ;)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

As a macro script
Change the name of the category, the tooltip and the button text.
Save as .ms file and drag and rtop it in 3dsmax viewports.
The script will appear in the given category, where you can assign a hotkey to it or can create a toolbar button.

macroscript MaySelectionModeToggle
category:"miauu"
tooltip:"MaySelectionModeToggle"
buttonText:"MaySelectionModeToggle"
(
	MouseConfigManager.MayaSelectionMode = not MouseConfigManager.MayaSelectionMode
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.