How do you get rid of/simplify VEX include?

   1739   4   0
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
I am trying to set up vex libraries for Studio deployment.
I don't want to put everything in:
$HOUDINI_USER_PREF_DIR/vex/include

For example I have:
$HOME/HoudiniLibs/myLib/myLib.h

Now in a wrangle node I can write:
#include “$HOME/HoudiniLibs/myLib/myLib.h”
and that will work.

1.Is there a way to set it up so I can just write:
#include “myLib.h”
Without putting it in $HOUDINI_USER_PREF_DIR/vex/include

2.Is there a (non-intrusive) way to include myLib.h by default?

I guess I can already shorten it to
#include “$MY/myLib.h”
Via a custom environment variable. But that seems not ideal.

—–
I have tried using houdini.env and packages ( http://www.sidefx.com/docs/houdini/ref/plugins.html [www.sidefx.com] )
to add my script library to Houdini.

I tried adding
HOUDINI_VEX_PATH = $HOME/HoudiniLibs/myLib;&
to Houdini.env, but that didn't make a difference.


I also named the following script myLib.json and put in
$HOUDINI_USER_PREF_DIR/packages

"env": 
[
    {
        "path" : "$HOME/HoudiniLibs/myLib"
    },
    {
        "HOUDINI_VEX_PATH" : "$HOME/HoudiniLibs/myLib"
    }
]


On startup I get the following in the :
= = = Houdini Package log = = =
Processing ‘…/packages/myLib.json’
ERROR: Syntax error in ‘…/packages/myLib.json’

I don't see what I am doing wrong. Can somebody else tell?

I have a pythonrc script modifying houdini.env . Could that be causing this? It seems unrelated cause this points to a syntax error.
Edited by DASD - Aug. 8, 2019 05:51:31
User Avatar
Member
1895 posts
Joined: Sept. 2015
Offline
By default I copy and paste only the vex files with my functions, as you do with *.h, that I'm going to use on a per project basis.

If I put them in a vex > include directory of the hips directory I only have to use #include <thefile.h> for houdini to find them.

So, although I don't know how…there has to be a way to over ride the default.( Other than explicitly in the wrangle )

Maybe support can help you if no one posts here.

Could you post supports response here if you go that route - would be good to know.
Edited by BabaJ - Aug. 8, 2019 10:07:12
User Avatar
Staff
1418 posts
Joined: July 2005
Offline
You can try adding $HOME/HoudiniLibs/myLib to the HOUDINI_VEX_PATH env var, for your $HOME/HoudiniLibs/myLib/include/myLib.h file.
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
rafal
You can try adding $HOME/HoudiniLibs/myLib to the HOUDINI_VEX_PATH env var, for your $HOME/HoudiniLibs/myLib/include/myLib.h file.

I tried it and it did not work. I might have done it wrong.
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
Seems that the $HOME part was not working for me for some reason.
  • Quick Links