Jump to content

Sublime Text


Recommended Posts

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!!!

Link to comment
Share on other sites

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"]

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:

import hou
import time

HIP_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 scene
# press cache button

print( 'Sim done: %s' % time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime()) )

Edited by yourdaftpunk
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...