progress bar for python script

   4550   3   0
User Avatar
Member
101 posts
Joined: Feb. 2015
Offline
Hi,
I am making an asset to export some height maps and splat maps to unity as .raw files. Maybe python is not the way to go on that one, and my code is certainly not optimal, but anyway, exports a getting pretty long time wise, and I would like some feedback.
I was wondering: is there a way to display any kind of progress bar during a python script execution ?
https://vimeo.com/user43710534 [vimeo.com]
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
http://www.sidefx.com/docs/houdini/hom/hou/InterruptableOperation [www.sidefx.com]
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
101 posts
Joined: Feb. 2015
Offline
Hi, thanks a lot,
I'm going to look into that as soon as I can.

…. later on .. that's exactly what I was looking for , for a long time
Thank you so much !!
Edited by gui2one - June 10, 2017 04:51:35
https://vimeo.com/user43710534 [vimeo.com]
User Avatar
Member
101 posts
Joined: Feb. 2015
Offline
It works like a charm, very handy.
I have a pure Python small issue though : if I cancel the operation, the progress dialog closes with an error:
“Unknown error when generating backtrace.”
I can't find any example about hou.OperationInterrupted exception being handled and I don't really know how to handle Python exceptions.
Are there any examples somewhere ?
https://vimeo.com/user43710534 [vimeo.com]
  • Quick Links