PDA

View Full Version : Overriding default selection event


jonadb
05-25-2011, 03:09 PM
Is there a way to override what happens when I click in the viewport?

I've written an enhanced selection script ( http://www.scriptspot.com/3ds-max/scripts/proselect ) and now I have to press a hotkey before I click in the viewport. I want to use it as default..

So I'm looking for a way to catch the event, see if it's a relevant click for the script, if not pass it on to the original event.

Any other approach or ideas are very welcome as well! :)

denisT
05-25-2011, 03:50 PM
Is there a way to override what happens when I click in the viewport?

I've written an enhanced selection script ( http://www.scriptspot.com/3ds-max/scripts/proselect ) and now I have to press a hotkey before I click in the viewport. I want to use it as default..

So I'm looking for a way to catch the event, see if it's a relevant click for the script, if not pass it on to the original event.

Any other approach or ideas are very welcome as well! :)

the only way to do it is to use SetWindowsHookEx.
You need WH_KEYBOARD_LL hook. or WH_MOUSE_LL... or both :)

jonadb
05-26-2011, 01:42 PM
Thx! But in the end I took a different approach, I abused the 'onSelectionChange' event and started from there.

It works very well, see video here: http://www.scriptspot.com/3ds-max/scripts/proselect

CGTalk Moderation
05-26-2011, 01:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.