Hi there, 

I'm working on an MPxLocatorNode, and i have to get the value of a plug at 
a given time. I can do it, using an MContext, and it works perfectly :
MTime t( 10. );
MDGContext ctx( t );
plug.getValue( oInput, ctx );

However, when i'm doing it in a loop (i.e. with a dynamic time), Maya will 
run indefinitely, even after the draw() has been done : 
for (double i=0.; i < 2.; i += 1.)
{

MTime t( i );
MDGContext ctx( t );
plug.getValue( oInput, ctx );

}
// this will never stop being evaluated.

I'm assuming it's because even though i'm using a MContext, a redraw of my 
locator is triggered, somehow. Then, because this redraw is triggered, my 
draw method gets run again, causing another redraw, and so on ? 
But then, why it's not happening if i'm not using a loop ? And then, how 
can i query a plug at a given time, in a loop ? Is there some hack, based 
on a setDirty or setClean call ? Is it reliable ?
Any help would be much appreciated, as i couldn't find lots of information 
about it online =[
Many thanks !

-- 
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/e388fbce-c7ac-4bf0-b33b-3475410b88b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to