RSS FEED

Using Mousewheel with Sliders

There exists an underused feature of the sliders in max that allows you to increase/decrease their value just by rolling the mousewheel. In a default state, there's a catch, once you roll your wheel and the value changes, the spinner loses focus and you have to click it again to be able to repeat the success. However, this is easy to fix:
rollout rollIt ""
(
    spinner spn "Click'n'roll:    " range:[-1e9,1e9,1] scale:.5

    on rollIt open do
        setFocus spn

    on spn changed val do
        setFocus spn
)
createDialog rollIt

USAGE: Run the script and roll your mousewheel. If you click elsewhere and the control loses focus, click inside it again to be able to use the mousewheel as before.

NOTE: It seems that in newer versions of max (2012, to be exact) this can cause the spinner to become unresponsive.

DISCLAIMER: All scripts and snippets are provided as is under Creative Commons Zero (public domain, no restrictions) license. The author and this blog cannot be held liable for any loss caused as a result of inaccuracy or error within these web pages. Use at your own risk.

This Post needs Your Comment!

3d designer berlin

interesting script.

is there a way to utilize this function in all spinners in 3ds max?

i am wondering why the mousewheel only works one time and then you have to focus it again. very strange behaviour

Swordslayer

None that I know of, unfortunatelly. It would be nice to be able to do that, though, especially when using a mouse with free-rotation mode.

Return to top