MotionBuilder (2012) Python UI, Modifiers when pressing buttons

Anyone know if there is any way to know if Shift/Ctrl/Alt is pressed when a FBButton is pressed?

FBInputModifier might have something to do with it, but I can’t find how to access it.

The only reference to this enumerator i could find in the help document was to this function in the FBRenderer Class :

bool  MouseInput (int pX, int pY, FBInputType pInputType, int pButtonKey, FBInputModifier pModifier, int pLayer=-1) 
      [I]Mouse input. [/I]

But there are no examples of how to get this value…

What I would suggest, even if it might a pretty annoying implementation, would be to perhaps use tkinter or similar (some said pygame) to check the status of what keyboard keys are down.

If you find a solution, it would be nice of you to post it here :slight_smile:

I’m not quite sure if this is helpful, I apologize if I missed the point.

We use Qt and that also provides Keyboard Modifier which are passed with every QKeyEvent.
All one needs to do is to check what item of the Enum equals the given modifier.

Maybe it’s the same with yours, just an idea. :):

[QUOTE=Killian;17061]I’m not quite sure if this is helpful, I apologize if I missed the point.

We use Qt and that also provides Keyboard Modifier which are passed with every QKeyEvent.
All one needs to do is to check what item of the Enum equals the given modifier.

Maybe it’s the same with yours, just an idea. :):[/QUOTE]

The only issue is that Motiobuilder doesn’t have any systems itself to check if the modifier keys are pressed or not, only an implementation of an enum with these keys indexed.

So one solution would to have the Qtmodules and import these within motionbuilder and use QKeyEvent to get the status of the keys.