I’m trying to get some functionality written down without the use of the C++ API. The thing is that I need my code to be continually evaluating say, every time a hard-coded node is re-evaluated after being flagged dirty.
I tried implementing something with expressions, but only when the frame is changed does it evaluate - in other words, not often enough.
Which brought me to my next idea - a while loop written in Python that constantly evaluates the data and spits out some new values! I was told by a professor that inside every program runs a while loop, waiting for user input (which then fires off a series of commands when certain parameters are met, and returns to the idle state). Seems to make sense, I could use that same methodology with a Python script. The problem is, whenever a while loop starts, it locks up all of Maya so that the user can’t feed new info into the loop.
Is there any way to get my loop to not cause Maya to freeze(AKA run in the background while still providing meaningful data to Maya). Right now I am experimenting with the multiprocessing module. Has anyone had success with a method like this, or am I going about this completely wrong and there is no way to provide such functionality outside of a compiled plugin. Any help would be greatly appreciated.
Thanks!