Making a 'Selection Brackets' button in max2012

Hey I'm trying to make a button that turns off Selection Brackets in max2012. So far, what I've got works in 2015 but not in 2012 which is really annoying. Could someone here help me out? Here's what I've got so far:

disp = NitrousGraphicsManager.GetActiveViewportSetting()
disp.ShowSelectionBracketsEnabled = not disp.ShowSelectionBracketsEnabled
<code>
 
Any help would be greatly appreciated. Thanks!!!

Comments

Comment viewing options

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

`

Hi,

I don't think you need a script for that. If you want to place button on toolbar or create shortcut:

Standard shortcut is "J"

From top Menu -> Customize -> Customize User Interface -> Toolbars or Keyboard -> Category: All Commands
Scroll to "Viewport Selection Show Selection Bracket Toggle" and just add button or shortcut.

Is it what do you need ? ('Selection Brackets' toolbar button)

But if you want to add button to your scripted rollout then:

actionMan.executeAction 0 "370"

Best,
Pixamoon

Jacob9000's picture

Hey PixamoonThanks a lot for

Hey Pixamoon

Thanks a lot for your reply. I want to script it because I'm making a button that does a number of things when you click it. Although I had no idea there was already a shortcut for Brackets :P

That code does turn off brackets but it doesn't turn the tick off in the viewport configuration window which really annoys me for some reason. I have worked out a goofy way to turn it off as well as untick the box though:

disp = NitrousGraphicsManager.GetActiveViewportSetting()
 
disp.ShowSelectionBracketsEnabled = false
actionMan.executeAction 0 "370"
pixamoon's picture

`

ha, nice nice

there is also other post I found recently:
http://www.scriptspot.com/forums/3ds-max/general-scripting/kill-selectio...

So it looks that:
disp.ShowSelectionBracketsEnabled = false
+ 2 times:
 max wire smooth

should make a job.

Best,
Pixamoon

Jacob9000's picture

`

Cheers

Comment viewing options

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