hython inherit environment

   1792   1   0
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
so, I want to have a standalone hython script that does something like this:

hou.hipFile.load(hipfile)
geo = hou.node(soppath).geometry()


however, this fails to find all my custom OTLs and fails to load the hipfile or build the geometry.

is there a way to get the hython session to inherit all exported variables and so forth?
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
geez… seems I usually answer my own questions…..

well, Hython DOES in fact inherit the entire environment beautifully.
My problem (duh) was that the newer version of houdini I was using was generating a minor error when loading older OTLs, and causing the hython script to fail. This simple fix works:


try:
hou.hipFile.load(hipfile)
except:
print “please ignore, minor warnings.”


drrrr
  • Quick Links