Reza Posted August 22, 2013 Share Posted August 22, 2013 Hi folks! I'm using Sublime Text for creating python tool.very nice and handy tool. but the only problem that I have with it is Houdini Modules Is there anyway to import hou from hython.exe module into Sublime? Thanks a lot!!! Quote Link to comment Share on other sites More sharing options...
yesyes Posted August 22, 2013 Share Posted August 22, 2013 (edited) Edited August 22, 2013 by yesyes 1 Quote Link to comment Share on other sites More sharing options...
yourdaftpunk Posted August 22, 2013 Share Posted August 22, 2013 (edited) Tell sublime to build with hython using your own custom python build system. Create a new build system (Tools > Build System > New Build System). Set "cmd" to point to your current version of Houdini-- notice I'm using build 487: {"cmd": ["C:/Program Files/Side Effects Software/Houdini 12.5.487/bin/hython.exe", "$file"]}[/CODE]Save as Hython.sublime-build and then in your python script tab where you are importing hou, go to Tools > Build System > Hython. Now when you hit Ctrl-B it should run no problemo.You can create different build systems for different houdini/hython versions and switch between them easily.If everything is working, you should be able to kick off a cache for a smoke sim scene from sublime with Ctrl-B using:[CODE]import houimport timeHIP_FILE = 'C:/path/to/scene.hip'CACHE_NODE = '/obj/import_smoke/import_smokefields'print( 'Sim starting: %s' % time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime()) )# load scenehou.hipFile.load(HIP_FILE)# press cache buttonhou.node(CACHE_NODE).parm('execute').pressButton()print( 'Sim done: %s' % time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime()) )[/CODE] Edited August 22, 2013 by yourdaftpunk 2 1 Quote Link to comment Share on other sites More sharing options...
Reza Posted August 22, 2013 Author Share Posted August 22, 2013 Thank you very much!!! 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.