createPreferenceRegistry(registry_name, file_name, prefs, prefix_name=None, binary=False)
The created registry can be saved to disk in the user preference directory ($HOUDINI_USER_PREF_DIR) using hou.savePreferences(). Preferences stored in the registry can be updated with hou.setPreference() and accessed with hou.getPreference(). To update preferences from disk, use hou.loadPreferences(). Note that Houdini does not automatically load the registry on startup.
Parameters ¶
registry_name
The unique identifier for the registry.
file_name
The base file name, including its extension. Supported extension: .pref
(text format) and .json
(JSON format).
prefs
A dictionary containing preference key-value pairs. Keys represent preference names, and values can be of type int
, float
, or str
.
prefix_name
An optional prefix to prepend to preference names.
binary
If True
, saves the registry as a binary JSON file. The flag is ignored for text files.
See also |