I've noticed that print can be delayed until Maya is idle. You might want to try other methods of printing. If you have a logger object, logger.info is often more responsive than print. Or maybe you could use something like MEL's headsUpMessage or a GUI element like a messageLine?
On Wednesday, 8 November 2017 21:08:22 UTC+11, Simone Tartaglia wrote: > > Hi guys, is the first time I'm posting in this group, but I've been a long > time follower. > > Scenario: > I'm scripting a custom plugin node that checks the value of an input. > If the input value is major than a "limit value" attribute in the custom > node, it then prints a warning to the console. > In order to print to the console from inside the compute() method I'm > using a standard print() function. > > Problem: > The node is working correctly, but during playback and timeline scrubbing > the warning are printed all at the same time, at the end "on release" of > the mouse click. > I'd like the node to print the warning messages every time it evaluates > rather than at the end. > Scenario that happens only on timeline scrubbing and playback. > > I've been searching around and the 2 possible solution I've found so far > are: > 1 - scriptjob on "timeChanged" > 2 - expression node, to print every frame > > Both the solutions seems to me patchy workarounds rather than solid > answers. > If you could point me in the right direction it would be much appreciated!! > > all the best, > > Simo. > -- 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/422fae90-b400-462e-82fe-a2857f1de268%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
