### Otl scan Path

26332   13   1
Member
2624 posts
Joined: Aug. 2006
Offline
I want the scan path to look for otls in the home dir as usual and other directories ie .But this throws up errors in the console. Does anyone know how to set this up correctly in windows. Linux and OSX work correctly

HOUDINI_OTLSCAN_PATH = %HOME%houdini12.1\otls;Crojects\otls

I get the following errors in the console

Warning: Bad operator type when binding handles: Object/path
Warning: Bad operator type when binding handles: Object/pathcv
Warning: Bad operator type when binding handles: Sop/platonic

etc etc

Rob
Gone fishing
Member
1637 posts
Joined: Nov. 2006
Offline
When you set any of the Houdini related search paths you generally need to explicitly add the default Houdini directories like $HH/otls to your path. You can also just add ‘&’ and Houdini will automatically include it's defaults in place of the sign. echo$HOUDINI_PATH
/home/gthompson/tooldevhome/gthompson/tooldev/hdk/:&

In this case this really means to search the directories I've specified, as well as the ones Houdini would by default search, which would be something like $HIP/otls,$HOME/houdiniX.Y/otls, $JOB/otls,$SITE/otls, $HH/otls, etc. Graham Thompson, Pipeline Supervisor @ Digital Domain Member 2624 posts Joined: Aug. 2006 Offline Hi Graham, I actually attempted that as per my set up in osx and linux which both work. What ever I have attempted in windows fails with the errors. Hence my asking about setting this up in Windows. Rob Gone fishing Staff 68 posts Joined: Dec. 2010 Offline hey rob here's the only way I was able to get it to work: Edit the houdini.env file in your home/houdini12.0 directory. define your path using the “@” symbol to mean all the standard path locations. Mine looks something like this: HOME = “CUsers/john/Documents” MYJOB = “CUsers/john/proj/foo” HOUDINI_OTLSCAN_PATH = “@/otls;$MYJOB/otl;$HOME/houdini12.0/otl” I had to define the vars used in the path *in this file*. No matter what I tried I could not get externally defined env vars to resolve from here. I was hoping to be able to change$MYJOB on the fly as I jumped from project to project and *not* have to hard code it here, but I couldn't figure it out.
Nonetheless, at least I can have my otls sitting in logical folders and not lose them.

I'd love to know if there is a syntax that is able to use a windows environment variable in this file. (%BLORT% doesn't work; $BLORT and \$BLORT all return null strings when you examine the path).

If this method doesn't appeal to you, you might want to consider using the OPLibraries file. It would have hardcoded paths to each and every one of your otls.
-j
john mariella
Senior Technical Director
SideFX
www.sidefx.com
Member
2624 posts
Joined: Aug. 2006
Offline
I seriously think something is very broken with the otl scan path in windows. Everybody has a different answer and syntax. Linux and OSX platforms work perfectly for me and evaluate as expected with the path syntax I would of used in the first place. !

Rob
Gone fishing
Member
7067 posts
Joined: July 2005
Offline
The problem is that no one seems to understand the fully correct syntax, while some slightly bad variations happen to work depending on the platform/method.

Let me try to lay out some of the rules:
- Houdini only expands environment variables in the hscript syntax. ie. $HOME, not the DOS syntax like %HOME%. - The path separators should be semi-colon ( instead of colon (. This works on all platforms. Linux/OSX happen to also accept colon ( as well. - When you override a variable, you should have “&” in there somewhere so that the default path is still used. Depending on your shell, this is sometimes a special character, in which case you need to ensure that you set it with the correct escaping. - On Windows especially, make sure you launch Houdini from the shell you set the environment variable. You cannot set it into a shell and then expect the Start Menu > Houdini to see it. - You must set your environment variable *BEFORE* Houdini is loaded. - If you're using houdini.env (as an alternative), then you must use double quotes if your variable value contains spaces. Member 2624 posts Joined: Aug. 2006 Offline Hi Edward, All of those rules at some point got followed I was told to use %HOME% by support after trying$HOME !

Using the houdini.env file

HOUDINI_OTLSCAN_PATH = C:\Projects\otls;$JOB\otl;&; Well the above syntax does not work for me on windows. Yet its correct isn't it ? I have even tried forward slashes. Rob Gone fishing Member 7067 posts Joined: July 2005 Offline Some things to do: - Remove all spaces - Remove trailing semi-colon - Change all backslashes to forward slashes After that, some tests you can do from within Houdini: - Ensure that in the Windows > Operator Type Manager > Configuration > Use OPlibraries Files to Find OTLs is OFF. - Now invoke Windows > Shell. Type in hconfig -ap. Check what Houdini thinks HOUDINI_OTLSCAN_PATH is expanding to. Member 2624 posts Joined: Aug. 2006 Offline Hi Edward, Thank you for the pointers I ran starting from a blank .env HOUDINI_OTLSCAN_PATH=CProjects/otls;$JOB/otl;&

then

hconfig -ap

Which now works !?! but then had a huh moment and reverted and saved the .env file back to

HOUDINI_OTLSCAN_PATH = CProjects/otls;$JOB/otl;&; Which now also works after a restart of houdini. !. Is there some source ~/. action going on in windows. HOUDINI_OTLSCAN_PATH=CProjects/otls;$JOB/otl;&

Is how I am leaving it.

Rob
Gone fishing
Member
21 posts
Joined: Feb. 2012
Offline
Interestingly enough, I get the same bad operator type errors on startup of Houdini but my OTLs are working correctly and the HOUDINI_OTLSCAN_PATH is showing correctly in shell. Not sure why, I guess something with Windows that I can ignore?

error:
Warning: Bad operator type when binding handles: Object/path
Warning: Bad operator type when binding handles: Object/pathcv
Warning: Bad operator type when binding handles: Sop/platonic
Warning: Bad operator type when binding handles: Cop2/emboss

Windows environment variable:
HOME > Epath/to/project/

houdini.env file:
SITE = “Epath/to/project/houdini12.0”
JOB = “$HSITE/files” HOUDINI_OTLSCAN_PATH = “$HSITE/otls;&”
Member
21 posts
Joined: Feb. 2012
Offline
soooooooooo, 10 seconds after I posted my message I found a thread that solved my problem.

Heres the solution if anyone looks for this in the future, found from this thread: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=11496&sid=5791fadd3eb15a67cee447196260a0ad [sidefx.com]

I had to add a reference to the default OTLs in order to avoid the error, so

HOUDINI_OTLSCAN_PATH = “$HSITE/otls;&” becomes HOUDINI_OTLSCAN_PATH = “$HSITE/otls;&;$HFS/houdini/otls” Member 85 posts Joined: Aug. 2010 Offline There is another option: Instead of setting config variables explicitly such as HOUDINI_OTLSCAN_PATH ect you can just append onto the HOUDINI_PATH You just need to conform to the Houdini folder structure as it works in$HFS and $HOME ie your directory can contain any of the following folders otls scripts config/Icons dso toolbar soho you append the directory path to HOUDINI_PATH and make sure you also append the default paths shortcut “&”. Separate different paths with “:” on linux and “;” on windows. for example in the houdini env: on windows: 'HOUDINI_PATH' = “”CProjects;&" on linux: 'HOUDINI_PATH' = “”CProjects“:&” if you have a python wrapper for Houdini instead of using Houdini Env (my preference), you can let the os module deal with the path joining and separators ect, this way the code is not specific to any platform: import os os.environ = os.pathsep.join("") the code above will work in both linux and windows CAVEAT: If you use “HOUDINI_PATH, do not set any other config location variables such as ”HOUDINI_OTLSCAN_PATH“ or ”HOUDINI_TOOLBAR_PATH". Edited by - Jan. 10, 2014 11:15:49 Sam Swift-Glasman Art Director Five AI Member 85 posts Joined: Aug. 2010 Offline mattv soooooooooo, 10 seconds after I posted my message I found a thread that solved my problem. Heres the solution if anyone looks for this in the future, found from this thread: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=11496&sid=5791fadd3eb15a67cee447196260a0ad [sidefx.com] I had to add a reference to the default OTLs in order to avoid the error, so HOUDINI_OTLSCAN_PATH = “$HSITE/otls;&”

becomes

HOUDINI_OTLSCAN_PATH = “$HSITE/otls;&;$HFS/houdini/otls”

If you want to use HSITE just set it as a variable:

HSITE = “CProjects”

there is no need to append $HSITE/otls to the “HOUDINI_OTLSCAN_PATH” as it will get picked up anyway. If you set “HSITE” and leave “HOUDINI_OTLSCAN_PATH” unset you will pick up:$HSITE/otls
$HFS/otls$HOME/otls

also note that Houdini on windows expects forward linux style paths. I have had issues passing windows style paths to Houdini.

hope that helps
Sam Swift-Glasman
Art Director
Five AI
Member
18 posts
Joined: Nov. 2011
Offline
Hey guys.

I'm running into similar issues as discussed here.

I'm using batch script to setup environment for people based on the project they are working on. The idea is that houdini should always pick up the default studio otls location (which holds all not project specific otls), plus a project specific otl folder, so I don't overpopulate their menus with assets they don't need. Studio OTLs are being loaded using HSITE and that works like a charm. However I can't get houdini to load any extra folders. I don't want to be using houdini.env, because I'd like to avoid doing any changes to local houdini installs.

This is the .bat script I'm using to set simple environment

set HSITE=K:\Studio\OTL\Path
set PYTHONPATH=%PYTHONPATH%;K:\Paths\to\custom\libraries
“C:\Program Files\Side Effects Software\Houdini 13.0.476\bin\houdinifx.exe” -s Technical

I was hoping to just add project specific folder somewhere, but I've tried countless combinations of variables, and nothing seems to pick it up correctly.

In short: I need to use LocationStudio/OTLS as HSITE + LocationProject/OTLS as extra otl libraries

Any ideas on how to get to this point?

Cheers
Technical Director @ Kredenc
www.mkolar.com [mkolar.com]