That's exactly what I'd like to do. I'm not too familiar with Qt yet, but I did realize that I could try running a loop through python that could recognize a keypress while the mouse is held down. I could start the python loop while the mouse is pressed down, and end the loop with a mouse-release. The problem then becomes this:
Does Python have a way to detect a keypress? Thanks!! On Wednesday, February 7, 2018 at 5:27:04 PM UTC-8, Michael Boon wrote: > > So your problem is that Maya doesn't notice the hotkey being pressed while > the mouse is down? > > Maya doesn't appear to have a scriptJob or an MMessage for a key being > pressed. > > If you're familiar with Qt, you could try using a Qt event handler. I'm > sure you could detect the key being pressed, but there's no guarantee that > you could get Maya to act on it. > > If you're not familiar with Qt, learning how to set up a handler is a fair > bit of effort for something that may not work at all. Hopefully, someone > else will have a better idea. > > > On Thursday, 8 February 2018 07:09:43 UTC+11, Isai Calderon wrote: >> >> Hi folks, >> >> For today's toy, I am attempting to *run a script while the mouse is >> manipulating an object*. >> >> ``` >> Use-case: >> While moving item, press hotkey to set key and move one frame forward. >> Mouse manipulation is still live on the item. >> The hotkey can be repeated indefinitely. >> ``` >> >> I am using Pymel, and am looking into a scriptJob to do this, but not >> sure which `Event` or `Condition` to use, or if it should be a new >> `context` tool instead (or combine them)... >> >> Any thoughts? >> >> Thank you! >> >> Isai >> > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/20b31f96-1b3d-4dfc-a6d6-a0afedf6447b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
