On this page

Overview

The Houdini Path is a list of directories in which to look for things like configuration files, ordered from highest priority (made by the user) to lowest priority (factory defaults shipped with Houdini). The default path includes:

  • Directories added by the package system.

  • The directory containing the current HIP file ($HIP).

  • The user preferences directory ($HOUDINI_USER_PREF_DIR).

  • The install directory ($HFS).

(Note that not all of these directories are writeable ,or should be written to even if they can be. For example, install directory.)

You can set or read the Houdini Path as a colon-separated string in the $HOUDINI_PATH environment variable. However, in that variable, an ampersand (&) represents “the standard Houdini Path contents”. So the contents of the environment variable will usually not explicitly contain all elements of the path.

Path lookups

Often, Houdini will look for different types of data in different sub-directories on the path. For example, it looks for help files in an hda sub-directory (if it exists) under each directory on the path, and help in a help sub-directory.

Note

For historical reasons, Houdini looks for assets in both hda and otls sub-directories.

For some types of data, Houdini will compose the data in each directory on the path, with earlier items on the path overriding equivalent data in later items. This is usually the case for configuration. For other

Scripting

You can get the current Houdini Path as a list of (expanded) strings in HOM using hou.houdiniPath().

The following HOM functions exist to help you load data from files on the Houdini Path:

hou.findDirectory(dirname)

Returns the path of the highest-priority (earliest in the path) sub-directory with the given name.

hou.findDirectories(dirname)

Returns a tuple of paths of all sub-directories with the given name on the path.

hou.findFile(filename)

Returns the path of the highest-priority (earliest in the path) file with the given name.

hou.findFiles(filename)

Returns a tuple of paths of all files with the given name on the path.

hou.findFilesWithExtension(ext)

Returns a tuple of files with the given extension on the path.

Note

The find functions raise a hou.OperationFailed exception if they don’t find anything, so you should call them instead a try-except block. For example:

try:
    config_dirs = hou.findDirectories("config")
except hou.OperationFailed:
    config_dirs = ()

Basics

Getting started

Next steps

Customization

Guru-level