multiprocessing.pool and Hython

   1346   1   1
User Avatar
Member
258 posts
Joined: July 2006
Offline
Hello, I have a question, regarding hython

I am making my own wedger, which are a few lines of python really. it works fine, but i am trying to use multiprocessing to split loops in batches. does anybody have any idea how to adjust this code, thanks

below code opens the file and changes the scale from 0 to 24 times and writes it out to file.
lets say i want to run these in blocks of 4 and finally the remainder.



hou.hipFile.load("filename.hiplc")
wedger = hou.parm('/obj/geo1/transform1/scale')
cache = hou.node('/out/cacheme')

#####WEDGE
for wedge in range(0,24):
    print wedge
    wedger.set(wedge)
    cache.render(verbose=True)
Edited by tricecold - Sept. 22, 2018 22:05:56
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
User Avatar
Member
258 posts
Joined: July 2006
Offline
I forgot to post it but I got it working fully now.

After getting a TR1950X , I really wanted all those cores to be fully utilized. This tool allows you to do that, running multiple wedges at the same time or caching source frame range in batches of N frames simultaneously. Certain jobs can speed up multiple folds. For example Whitewater sourcing, RBD or Solid simulations running as wedges.

Your text to link here… [github.com]
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
  • Quick Links