Notifications
Clear all

[Closed] Script for Maya Selection Mode Toggle?

I’m trying to set something up for quick toggling between Max and Maya selection mode.

Ideally I’m looking for 3 functionalities that I can bind to different keys

Maya Selection Mode ON
Maya Selection Mode OFF
Toggle Maya Selection Mode

Please let me know if you can help. I know it has something to do with this setting

MouseConfigManager.MayaSelectionMode = true
or
MouseConfigManager.MayaSelectionMode = false

Thanks

5 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

you’ve already answered your own question yourself


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

do you need to know how make it macroscript? see Defining Macro Scripts in the max script help. there are some simple examples

Hi,

Thanks for your reply. I can look into that. I was wondering, can you tell me what is the benefit of making it a macroscript?

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

in case you want to “hotkey” it, or make a button, or add to a RightClick menu…

Hey there.

I was looking for a way to toggle the “Maya Mode Selection” on the fly (so that I don’t have to open the Customize User Interface Window).

The idea is to disable the “Maya Mode Selection” just to allow me to SHIFT clone/extrude objects and components (like faces or edges) and then to re-enable right after that.

I tried to use the mascrocript mentioned above

macroScript Macro1
	category:"Selection Mode"
	toolTip:"Maya Selection Mode Toggle"
(
	-- Maya Selection Mode ON
	  MouseConfigManager.MayaSelectionMode = true
	   -- Maya Selection Mode OFF
	  MouseConfigManager.MayaSelectionMode = false
	   -- Toggle Maya Selection Mode 
	  MouseConfigManager.MayaSelectionMode = not MouseConfigManager.MayaSelectionMode 
)

but doesn’t seem to work (the selection mode doesn’t change).
Do I missed something?

Many thanks in advance.

All right, I figured it out.
At the beginning I was using the script all together and so was only turning on the Maya Mode Selection.
Then I tried to separate the 3 different lines of the script and I found out that they work as separate scripts (ON, OFF, TOGGLE).
At the very beginning I though the the 3 lines were required to allow the script to work.