berniebernie Posted June 1, 2016 Share Posted June 1, 2016 Hello I'm sending alembic rops to hqueue and there's a lot of preroll. Even with alfred-style progress turned on, I have no feedback on what's going on. I was thinking that I could add a python node to write to the stdout (which I though would show up in the hqueue logs) like so: import sys f= hou.frame() sys.stdout.write('frame: '+str(f) + '\n') But it doesn't work. Any ideas ? When I start houdini with the -foreground option (so that the shell it launches from doesn't spawn a new process and should receive outputs) and write to stdout, it only shows up in the python console Thanks Quote Link to comment Share on other sites More sharing options...
dennis.albus Posted June 1, 2016 Share Posted June 1, 2016 (edited) Hey, I had the same problem with Tractor. Here's what worked for me in the end (no warranty that it also works with hqueue). The script is run as a post-frame-script in the alembic rop. import sys start = hou.node(".").parm("f1").eval() end = hou.node(".").parm("f2").eval() current = hou.frame() progress = str(int(hou.hmath.fit(current, start, end, 0.0, 100.0))).zfill(3) print("\rFrame {0} done".format(current)) print("\rALF_PROGRESS {0}%".format(progress)) sys.stdout.flush() It seems that both the carriage returns AND the flushing are necessary. If any of this is missing I will only get the information in the log when the whole caching process is done. Hope this helps, Dennis Edited June 1, 2016 by dennis.albus 1 Quote Link to comment Share on other sites More sharing options...
berniebernie Posted June 1, 2016 Author Share Posted June 1, 2016 13 minutes ago, dennis.albus said: Hey, I had the same problem with Tractor. Here's what worked for me in the end (no warranty that it also works with hqueue). The script is run as a post-frame-script in the alembic rop. import sys start = hou.node(".").parm("f1").eval() end = hou.node(".").parm("f2").eval() current = hou.frame() progress = str(int(hou.hmath.fit(current, start, end, 0.0, 100.0))).zfill(3) print("\rFrame {0} done".format(current)) print("\rALF_PROGRESS {0}%".format(progress)) sys.stdout.flush() Hope this helps, Dennis Thanks for the snippet, it actually works in hqueue now, even the simple print, in a python node (instead of the alembic rop which only fires when a frame is written, not during preroll). My problem was that my python node was after the dopnet which was simulating, so it never fired during preroll. Silly me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.