This is due to the evaluation manager. If you switch to DG instead of
Parallel, you will see that it will work.
Ok, so how should we go around not limiting ourselves to DG evaluation only?
The problem is the printing into the script editor, instead, you could log
into the Output Window with sys.__stdout__:
import sys
sys.__stdout__.write('hello\n')
logger.info would suffer from the same problem since it would out pipe into
the Script Editor, but logging to a file would work, but it's the
interactive thing you probably wanted.
On Wednesday, November 8, 2017 at 11:08:22 AM UTC+1, 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/aae9898b-4b98-4895-9f64-a0b7c01f75fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.