Change UI colour when snap / lock is active ?

Just a quick question to you guys, is it possible using Maxscript to change the colors of the UI when snap or lock is active ?

I'm simply looking for a way to give a better indication in the viewports that snap or lock is active.

For example changing the background colour to a different shade.

thanks.

Comments

Comment viewing options

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

...

for snaping you can use

snapMode.active = off
snapMode.active = on

And for selection lock this is the hack
(maxscript not provide better solution)

fn selLocked = 
(
	selectionlock = false
	sel = selection as array
	clearselection()
	if selection.count != 0 then selectionlock = true else selectionlock = false
	select sel
	selectionlock
)
-- to lock
if not selLocked() do (max spacebar)
-- and unlock
if selLocked() do (max spacebar)

bga

asymptote's picture

So it is possible ? Main

So it is possible ?

Main reason is I'm not always looking at the snap and lock buttons I'm looking in the viewport, I always forget they are on.

I'm looking for some way to indicate more clearly in the viewport that a toggle is active.

Ideally that would be background colour.

barigazy's picture

...

probably U will get flickering of the viewport if you do this.
I not know why you need that when lock and snap buttons are properly indicate lock or snap current state

bga

Comment viewing options

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