Well two things, buy an another laptop, or a more useful solution might be tracking Qt mouseLeaveEvent (or something like that) then force a full redraw of the viewport...
Nicolas Envoyé de mon iPhone Le 10 mars 2011 à 17:52, Inos <ivan.ser...@gmail.com> a écrit : > Hello Chad, > > (sorry for the resend, I just joined the group, and thought maybe more > people are having the same problem...) > I'm stuck for quite some time with the problem that you have solved. I > was trying to replicate the solution from the Shave & Haircut, with > the dummy transform, but I just can't find the hook for moving the > transform when the mouse moves. So, following your advice, I used Qt > (not using Python, but C++), and it works like a charm as far as > generating the mouse move events, but I have a big problem with the > actual drawing of the circle, so I was hoping you could help me out a > bit. > > I'm on a relatively cheap laptop running windows7 with a pretty > average graphics card, and the overlay drawing in the maya viewport > simply doesn't work. It either doesn't draw anything or paints the > background gray. That's why I tried using XorDrawing, but it's messing > with the maya grid and it's not consistent - sometimes the circle just > disappears. Also, when I move the cursor outside the viewport, part of > the circle remains drawn, so that's pretty bad. I would be very > grateful for any help, thanks in advance... > > Cheers, > Inos > > > On Jan 12, 11:36 pm, Chad Vernon <chadver...@gmail.com> wrote: >> I ended up using a Qt eventFilter on the viewport to capture the event >> from Qt and it seems to work fine. >> >> On Jan 11, 10:27 pm, Chad Vernon <chadver...@gmail.com> wrote: >> >>> I'm trying to replicate a brush tool much like the Artisan brush and the >>> Shave and a Haircut brush. I have an MPxContext set up and working fine and >>> the actual brush functionality seems to be working fine, I would just like >>> to render the opengl red brush ring for visual feedback. I want this to be >>> visible and follow themousearound whether themousebutton is pressed or >>> not. I scoured the docs and couldn't fine anymousemovecallback. >>> MPxContext has doPress, doDrag, doRelase, and doEnterRegion but no plain >>> mousemove event orcallback. I noticed on Shave and a Haircut's brush tool >>> that when you enter the context, it creates some dummy transform called >>> shaveBrushProxy that follows themousearound in the projected viewport >>> coordinates so there has to be some sort ofcallbackor hook I can use. >>> Anyone have any ideas? >> >>> Thanks, >>> Chad > > -- > http://groups.google.com/group/python_inside_maya -- http://groups.google.com/group/python_inside_maya