underscoreus Posted January 22, 2021 Share Posted January 22, 2021 (edited) Hi guys! I'm working on simplifying the setup in the computer lab at the school I work for. In that regard, I've been looking at making a centralized houdini.env file to put on our server. The best-case scenario would be if there is a variable I can enter into the local houdini.env file to tell it to look elsewhere for the rest of the config since this would give flexibility incase some local overrides are needed. Does such a variable exist? I've had a go trying to set PATH, HOUDINI_PATH, and HOUDINI_USER_PREF_DIR to a folder on my desktop as a test but neither seemed to give the result I wanted. Thanks for the read! Edited January 22, 2021 by underscoreus Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted January 29, 2021 Share Posted January 29, 2021 In houdini.env: HOUDINI_PATH=$HFS/houdini:/path/to/my_tools where my_tools is a directory that has a structure which houdini recognises (i.e otls, scripts folders etc ) 2 Quote Link to comment Share on other sites More sharing options...
underscoreus Posted February 10, 2021 Author Share Posted February 10, 2021 Sorry for the late reply, some other stuff came up, and had to put this project on ice for a week. I've gotten some of my setup working using a similar setup to what you suggested: (Note that I:\ is a networked drive) Quote HOUDINI_PACKAGE_DIR = "I:\_pipeline\_release\Houdini\18_0\packages" HOUDINI_PATH = "I:\_pipeline\_release\Houdini\18_0;&" This does solve the issue (or at least some of it?) detailed in the original post. However, while Houdini now reads my custom scripts/toolbars from this folder it is unable to read the .json package files I have there. My original plan was to have another houdini.env file in this server folder with all of the variables, but after testing and finding that to not work I moved onto the package approach. Testing my .json files locally inside ".../Documents/houdini18.0/packages" they work perfectly, but when I move them to "I:/_pipeline/_release/Houdini/18_0/packages" they don't get read and any plugins like Redshift or Arnold don't get added. If anyone's had success with this I'd love to hear from ya! Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted February 11, 2021 Share Posted February 11, 2021 Maybe this will help https://www.toadstorm.com/blog/?p=722 P.S. It might be much easier to write a wrapper script for launching Houdini, instead of struggling with .env and packages 2 Quote Link to comment Share on other sites More sharing options...
kiryha Posted February 12, 2021 Share Posted February 12, 2021 In case you need an example for the Houdini wrapper... 2 Quote Link to comment Share on other sites More sharing options...
underscoreus Posted February 15, 2021 Author Share Posted February 15, 2021 Thanks for all of the replies! I ended up doing something kind of similar. Since we don't adhere to a very strict pipeline system here I'm afraid making a dedicated launch script would bring the problem where students don't use it to launch Houdini, instead using the Houdini shortcut on the desktop or the start/search. I ended up making a little function in the pythonrc.py file making sure that it copies all packages from the server to the local packages directory every time Houdini boots up, so far seems to work decently enough. And if anyone coming to this thread in the future wants an example of what I made, here it is: from shutil import copy2 import glob from os import makedirs from os import path from getpass import getuser versionNumber = hou.applicationVersionString()[0:-4] source = r"I:/_pipeline/_release/Houdini/" + versionNumber + r"/packages" dest = r"C:/Users/" + getuser() + r"/Documents/houdini" + versionNumber +r"/packages" srcfiles = glob.glob(source + r"/*.json") def wifmGetPackages(): if path.exists(dest) == False: makedirs(dest) try: for f in srcfiles: copy2(f,dest) except Exception: print("Error in loading packages") wifmGetPackages() Quote Link to comment Share on other sites More sharing options...
j00ey Posted July 23, 2021 Share Posted July 23, 2021 Hi Martin I wondered if you stuck with this approach or found a better way of doing it? I'm trying to figure out how to get a small number of networked machines to share package files and have been struggling with the same issues... I'll try your method above - though I'm prototyping on a single non-networked machine. Presumably shouldn't be too difficult to roll out to the others if I can get it working. Thanks! Quote Link to comment Share on other sites More sharing options...
tamagochy Posted July 23, 2021 Share Posted July 23, 2021 Packages dir reads before env file, so you need to put json files in each houdini folder or use a wrapper ) Quote Link to comment Share on other sites More sharing options...
j00ey Posted July 24, 2021 Share Posted July 24, 2021 Thanks Andrii When you say in each Houdini folder you mean on each machine? I don't really know much about using a wrapper but I'll look into that as I'm trying to avoid maintaining all the machines' packages separately. 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.