A co-worker suggested the draw call hack as well. I'll look into the clock server. What about a MTimerMessage callback?
On Feb 25, 8:39 am, Seth Gibson <[email protected]> wrote: > I was actually looking at clock server myself for this very reason and > noticed that it uses some pretty specific headers )<maya/mocap.h>, ditto > with the MPxMidiInputDevice example (needs a midi lib for events from what i > can see). Does anyone know of any python modules that might provide that > sort of functionality? > > On Wed, Feb 25, 2009 at 3:45 AM, Olivier Renouard < > > [email protected]> wrote: > > I'd rather take a look at the mocap / clock server example in the devkit > > if you want something that acts as a data source. > > > What you said works Judd and it's a great way to setup fake dynamics bones > > / nodes that evaluate each frame but when writing a joystick / midi / > > gamepad controler I think the server things is what is advised usually. > > > Judd Simantov wrote: > > > I'm not sure how smart it is to do this, cause it definitely goes against > > the way the DG works, but if you create an MPxLocator node you can access a > > plug in your draw call and get or set the data in there. Again, its probably > > not the most clean thing to do, but I have done this on occasion when > > necessary. > > > On Tue, Feb 24, 2009 at 2:18 PM, hapgilmore <[email protected]>wrote: > > >> I'm creating a node that queries a gamepad (XB360 controller) and sets > >> attributes that mirror button states. > >> Everything works except that the compute must be manually triggered > >> (by editing a dummy attribute). > > >> Is there a nice way to force the compute? can you make an attribute > >> "dirty" every screen draw, or put it on a timer? > > >> I've thought about making a callback that waits a preset amount, and > >> then edits the attr, which re-triggers the callback, making an > >> infinite loop of sorts. Is that kosher? > > > -- > > Olivier Renouard > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
