Here’s my script so far. Can anyone make this more elegant/professional for me please? I think this will help alot of people who use wacoms in max. Also will be happy to credit anyone who helps with it in the script.
All for the community folks.
(
global selectionChanged
callbacks.removescripts #selectionSetChanged id:#myCallbackID
callbacks.addscript #selectionSetChanged "selectionChanged()" id:#myCallbackID
fn selectionChanged =
(
if not (isCreatingObject()) and not keyboard.shiftPressed do
max select
)
)
Replies
It's the same as pressing Q. But automates it everytime you make a selection.
the only potentially, mildly scary bit (without refreshing my memory about maxscript's dirty bits) is that selectionChanged is a global .
In this context I can't see it being a problem (it's probably required tbh)
I expect @monster or @miauu can clarify whether it's going to be an issue or not
As far as the rest of the script goes - if it works you're good. There's not really enough code there to provoke any bugs.
Ideally test this out with a wacom but woks fine with a mouse too.
If your in "attach" mode it bugs out and changes your selection type.
I tried having a go at it, there is a "bug" where if you drag click with move, rotate or scale tool you can still apply the effect by letting go of the mouse button before you stop moving the cursor. Although I haven't been able to get it to apply the tool effect when testing with a wacom, but only with my mouse. I'm assuming it's because something is still waiting on the mouse move to finish and if the left mouse button finishes before mouse move that action overrides the NodeEventCallback.
It works better