tottman1 Posted July 25, 2017 Share Posted July 25, 2017 (edited) Hey, so I have a situation where i have exported a load of rbd simulations to alembic and i now, after re-importing them back in as alembic archives, I want to export them out from Houdini as FBX. Now, i can do this fine on an individual level, but it takes a while to export each one and then I have to come back and export the next one when thats finished, usually an hour later or something. What i I would prefer to do is to create a python script to automatically export the next one so i can leave them all going over night or something but I dont have any idea how to do this. Can someone please help me out or point me in the right direction? Thanks Edited July 25, 2017 by tottman1 Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted July 25, 2017 Share Posted July 25, 2017 I would use a queue manager like HQueue or Deadline and submit these as jobs. If you're using a one off workstation you can certainly use Python to automate this process. It could be as simple as a list of things to do in order. An example is below. # Run for foo hou.parm('/obj/geo1/file1/file').set('$HIP/geo/foo.abc') hou.parm('/out/filmboxfbx1/sopoutput').set('$HIP/geo/foo.fbx') hou.parm('/out/filmboxfbx1/execute').pressButton() # Run for bar hou.parm('/obj/geo1/file1/file').set('$HIP/geo/bar.abc') hou.parm('/out/filmboxfbx1/sopoutput').set('$HIP/geo/bar.fbx') hou.parm('/out/filmboxfbx1/execute').pressButton() The script could get fancier like looking for files in a directory to automatically do this for, a list of parameters to change and a for loop, or any other way you want to go about it. This example is the least complex way of doing it and the most manual. 1 Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted July 25, 2017 Share Posted July 25, 2017 One other thing to consider when doing lots of actions like this, it's likely using only one processor core (or a couple of processor cores). If you're on a machine with lots of memory and lots of cores you can run many of these tasks concurrently. It'll use more memory linearly since it's concurrent instead of parallel but it'll speed up linearly as well. Quote Link to comment Share on other sites More sharing options...
tottman1 Posted July 28, 2017 Author Share Posted July 28, 2017 great, thanks luke. That looks like a good place for me to start 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.