Anyone knows if there is a way to print custom text from an IFD file while processing it?
Mantra logs archive reading logs, process, profiling info..etc, but what I would like (for now, probably more later) is a line at the end of the render saying that it's finished and some custom logging information (for renderfarm database stuff).
Also, is it possible to inject such custom text to a specific location from Houdini (ie..I don't just want it to be at the end of the IFD, but also to be logged at the end of the rendering process)? I've only found camera and object pre and post include.
I know IFDs can contain programming statements, just I'm not too familiar with the format yet, so hints welcome
If you want things in specific places, you'll likely have to run the IFD through “sed” or Python or something similar to inject the comments.
You can use the pre and post script fields on Objects, Cameras, Lights etc to add comments directly into the IFD, but these will go in specific places, and may not be inserted exactly where you want.
Try it out, put something like “echo Obj pre-script” etc into the script fields on Objects and Cameras, then look in the IFD and you'll see where they get inserted.
Cheers
peter B
Cheers,
Peter Bowmar ____________ Houdini 20.5.262 Win 10 Py 3.11
Yep, you can redirect from the IFD through a filter in the ROP directly. I'm pretty sure there are tips on this on Odforce since I can't remember exactly how to do it. The tricky bit is, you do it in the Command field (where the “mantra” command is) but I forget the exact syntax.
Cheers,
Peter B
Cheers,
Peter Bowmar ____________ Houdini 20.5.262 Win 10 Py 3.11
Ok, found a simpler way…logging it here just for the sake of completeness.
You can add a post frame script that just appends text (using cat or echo) to the already closed IFD for the given frame.
unix (echo “echo CUSTOMTEXT >>” “csphere.ifd”)
Notes: the first echo is a DOS command, the second echo goes in the IFD and it's a mantra command. Instead of hardcoding the filename, one could use channel referencing and reading the given ROP's “script” attribute (that's why I've split the quotation marks into two groups).