Nathan Mooth

NFX

About Me

Expertise
Not Specified
Location
Not Specified
Website

Connect

Recent Forum Posts

Hou module not picking up HOUDINI_PATH Feb. 9, 2018, 8:02 p.m.

Using hou.putenv() to set the ‘HOUDINI_PATH’ before loading the file seems to do the trick. Thanks for the suggestion Zephmann!

The odd thing is that hou.houdiniPath() still returns the wrong values, even though everything else works. Either way files are loading now without complaining and that is what I needed.

Also yes this was running from python with me handling initialization of the env vars and importing the hou module.

Promoting multiparm breaks Python menu scripts Feb. 6, 2018, 2:26 p.m.

So after some more research on the topic of why this is happening, it seems jsmack's comments are incorrect according to the documentation.

hou.pwd() documentation [www.sidefx.com]

It seems that the parameter containing the call to .pwd is returned rather than the parameter of the node that references the original parameter in order to maintain relative referencing. Seems this might be an issue with multiparms after all.

The only solution I have found is to duplicate the code on the referencing parameter to point to the HOM of the node it is referencing. Ugly, but functional-ish.

Hou module not picking up HOUDINI_PATH Feb. 6, 2018, 2:21 p.m.

I'm using the hou module in a custom python script. The process I am using is that I set the needed environment variables inside the python script via os.environ and add Houdini's python2.7libs folder to the sys.path before finally importing the hou module as per the documentation.

However when I load a hip file via hou.hipFile.load I get errors saying that houdini can't find some of the custom HDA's it contains. I keep these HDA's in a special folder for asset management purposes and made sure that it was included in the ‘HOUDINI_PATH’ environment variable that I set before importing hou. However, running hou.houdiniPath reveals that houdini sees the variable as set to what appears to be default values. If I then os.getenv the variable by name it does show it as being set and containing the proper folder that contains the hda/ and otl/ folders where I keep the missing assets. Confusing…

Is this a bug? Am I doing something wrong?