### Silent Install Houdini Engine for 3ds Max Source: https://www.sidefx.com/docs/houdini/3dsmax/gettingstarted This command demonstrates how to perform a silent installation of Houdini Engine for 3ds Max using the Houdini installer. The `/Engine3dsMax=Yes` argument ensures the plugin is included. This is useful for automated deployments. ```bash installer.exe /S /Engine3dsMax=Yes ``` -------------------------------- ### Houdini Installer Settings File Example Source: https://www.sidefx.com/docs/houdini/licensing/script_houdini_installations An example INI text file used for scripting Houdini installations. It contains authentication credentials (username/password or client ID/secret) and EULA acceptance dates. Specifying EULA dates in this file helps maintain backward compatibility. ```ini username=SideFX_Account_Username password=SideFX_Account_Password client_id=SideFX_WebAPI_Client_ID client_secret=SideFX_WebAPI_Client_Secret accept_eula=SideFX-2019-01-01 SideFX-2020-05-05 SideFX-Beta-2020-05-05 ``` -------------------------------- ### Houdini Setup Operator Example Source: https://www.sidefx.com/docs/houdini/ref/utils/icomposite An example demonstrating the 'setup' operator in Houdini, which boosts image luminance in pixels where alpha is greater than zero. This is useful for accommodating zero-black keying. ```Houdini Expressions icomposite abekas:34.rgb = setup .075 claw.pic ``` -------------------------------- ### Start Persistent MQ Server Example Source: https://www.sidefx.com/docs/houdini/ref/utils/mqserver An example bash script demonstrating how to start a persistent MQ Server with specific ports for relay and HTTP callback. This setup is crucial for PDG jobs to communicate with the MQ Server, ensuring necessary ports are open for bidirectional connections. ```bash #!/bin/bash RELAYPORT=53000 HTTP_CALLBACK_PORT=53001 echo "STARTING MQSERVER with RELAY PORT ${RELAYPORT} and HTTP CALLBACK PORT ${HTTP_CALLBACK_PORT}" /mnt/hq/houdini_distros/hfs.linux-x86_64/bin/mqserver -s -p ${RELAYPORT} -n 1024 -l 2 -w ${HTTP_CALLBACK_PORT} 1024 result ``` -------------------------------- ### Webapiclient Example Source: https://www.sidefx.com/docs/houdini/licensing/publicapi/index Example usage of the `webapiclient.py` script for interacting with the Houdini license server API. ```APIDOC ## Using webapiclient.py ### Description This example demonstrates how to use the `webapiclient.py` script to send commands to the Houdini license server. ### Code Example ```python import webapiclient # Initialize the service with the API endpoint service = webapiclient.Service("http://localhost:1715/api") # Example: calling the cmd_ls function with arguments # It's recommended to use keyword arguments (kwargs) for reliability response = service.cmd_ls("arg1", arg="value") print(response) ``` ### Explanation The `webapiclient.Service` class abstracts the HTTP requests. Methods like `cmd_ls` correspond to commands that can be sent to the license server. Using `kwargs` is preferred over positional `args` as the order or presence of positional arguments might change in future releases, while unknown keyword arguments are ignored, providing more robustness. ``` -------------------------------- ### Houdini Installer Install - Product with Spaces Source: https://www.sidefx.com/docs/houdini/ref/utils/launcher This example shows how to specify product names that contain spaces when using the `houdini_installer` command. Enclosing such names in quotes is necessary for correct parsing. ```bash houdini_installer install --product "Engine Maya" ``` -------------------------------- ### Houdini HQueue Render ROP Configuration Example Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted This snippet illustrates the configuration of an HQueue Render ROP within Houdini, specifying the output driver, HQueue server address, and target Houdini installation path for different operating systems. It assumes a basic Houdini scene with geometry, lighting, and a Mantra ROP has been created. ```text HQueue Server: http://serverMachine:5000 Target HFS (Linux): /opt/hfsX.Y.ZZZ Target HFS (macOS): /Applications/Houdini/HoudiniX.Y.ZZZ/Frameworks/Houdini.framework/Versions/Current/Resources Target HFS (Windows): C:/Program Files/Side Effects Software/Houdini X.Y.ZZZ ``` -------------------------------- ### Start Houdini Engine Session Example Script Source: https://www.sidefx.com/docs/houdini/unreal/publicapi This simple Python script shows the basic procedure for starting a Houdini Engine session within the Unreal Engine environment. This is a foundational step for most Houdini Engine operations. ```python # start_session_example.py is a simple example that starts the Houdini Engine session. ``` -------------------------------- ### List Houdini Installations Source: https://www.sidefx.com/docs/houdini/ref/utils/launcher The `list` subcommand displays details about installed Houdini products and versions. If no directory is specified, it lists all installations. Users can provide specific installation directories to get details about them. ```bash houdini_installer [options] list [directory]... ``` -------------------------------- ### Direct HTTP Request Example Source: https://www.sidefx.com/docs/houdini/licensing/publicapi/index Example of constructing and sending a direct HTTP POST request to the Houdini license server API. ```APIDOC ## Direct HTTP Request Example ### Description This example shows how to manually construct and send an HTTP POST request to the Houdini license server API, similar to what `webapiclient.py` does internally. ### Code Example ```python import requests from json import dumps function_name = "cmd_ls" args = ["arg1"] kwargs = {"arg": "value"} # The request body is typically form-urlencoded JSON data = dict(json=dumps([function_name, args, kwargs])) endpoint_url = "http://localhost:1715/api" headers = dict() headers["Content-Type"] = "application/x-www-form-urlencoded" response = requests.post(endpoint_url, data=data, headers=headers) print(response.text) ``` ### HTTP Request Format ``` POST /api HTTP/1.1 Host: localhost:1715 Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 43 json=["cmd_ls", ["args"], {"arg": "value"}] ``` ### Explanation This method involves manually setting up the request payload, including the command name, arguments, and keyword arguments, all encoded within a JSON string as form data. The `Content-Type` header must be set to `application/x-www-form-urlencoded`. ``` -------------------------------- ### Houdini Plugin Installation Package Example (JSON) Source: https://www.sidefx.com/docs/houdini/ref/windows/package_browser A JSON file used to define an installation package for Houdini. This file specifies the path to the plugin content, which Houdini uses to add the directory to the HOUDINI_PATH environment variable for discovery and loading. ```json { "path" : "$HFS/packages/viewer_handle_demo" } ``` -------------------------------- ### Linux Scripted HQueue Server Installation Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted This set of commands demonstrates how to perform a scripted installation of the HQueue server on a Linux system. It involves unpacking the Houdini installer tarball, navigating to the installer directory, and running the `houdini.install` script with specific arguments for auto-installation, EULA acceptance, and HQueue server installation. The server will be installed in `/opt/hqueue` and run as the `root` user. ```bash # Unpack the installer tarball. tar zxf houdini-X.X.XXX-linux_x86_64_gccY.Y.tar.gz # Locate the unpacked installer directory. cd houdini-X.X.XXX-linux_x86_64_gccY.Y # Run the installer script to install the server. sudo ./houdini.install --auto-install --accept-EULA 20XX-XX-XX --no-install-houdini –-no-install-license --install-hqueue-server --hqueue-server-dir /opt/hqueue --upgrade-hqueue-server-if-exists yes ``` -------------------------------- ### Install HQueue Client with Old Houdini Installer (Linux) Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted This code snippet shows the process of installing the HQueue client component on a Linux machine using the old Houdini installer. It requires running the installer without sudo and specifying the HQueue server URL. The client is installed in a user-defined location or defaults to /home/hquser/hqclient. ```shell tar zxf houdini-X.X.XXX-linux_x86_64_gccY.Y.tar.gz cd houdini-X.X.XXX-linux_x86_64_gccY.Y ./houdini_install ``` -------------------------------- ### Linux Scripted HQueue Client Installation Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted This set of commands shows how to script the installation of an HQueue client on Linux. Similar to the server installation, it requires unpacking the Houdini installer tarball and running the `houdini.install` script. Key parameters include specifying client installation directory, the user the client will run as, and the HQueue server address and port. ```bash # Unpack the installer tarball. tar zxf houdini-X.X.XXX-linux_x86_64_gccY.Y.tar.gz # Locate the unpacked installer directory. cd houdini-X.X.XXX-linux_x86_64_gccY.Y # Run the installer script to install the client. sudo ./houdini.install --auto-install --accept-EULA 20XX-XX-XX --no-install-houdini –-no-install-license --install-hqueue-client --hqueue-client-dir /home/myUser/hqclient --hqueue-client-user myUser --hqueue-server-name myServer --hqueue-server-port 5000 ``` -------------------------------- ### HDA Instantiation Example Script (Python) Source: https://www.sidefx.com/docs/houdini/unreal/publicapi This Python script, eua_curve_input_example.py, is a direct example from the 'Instantiate HDA using API' guide, demonstrating HDA instantiation with curve inputs. ```python # eua_curve_input_example.py is a Python script from the Instantiate HDA using API guide. ``` -------------------------------- ### Houdini Startup Script Example Source: https://www.sidefx.com/docs/houdini/commands/_guide This is the default startup script for Houdini FX. It's executed when Houdini first launches and is responsible for setting up the initial environment. For other Houdini products, different scripts like `houdinicore.cmd` might be used. ```HScript $HFS/houdini/scripts/123.cmd ``` -------------------------------- ### Example Houdini License Checkin Event Source: https://www.sidefx.com/docs/houdini/licensing/webhook/e100 An example demonstrating a full event callback for a Houdini license check-in. This includes metadata like event time and ID, along with the detailed event payload showing a specific license check-in scenario. ```json { "event_time": 1682011410, "event_id": "E100", "type": "event_callback", "event": { "license_id": "abcdefgh", "count": 2, "product": "Houdini-Master", "version": "19.5", "total_tokens": 10, "users": ["user1@machine1", "user2@machine2"] } } ``` -------------------------------- ### Houdini Wiki - Load Individual Example Source: https://www.sidefx.com/docs/houdini/help/createexamples Markup to display a button for loading a single Houdini node example. It can specify the example file and the node it's associated with. Path and include properties offer further customization. ```wiki :load_example: Copy Attributes example #examplefile: /examples/nodes/sop/copy/CopyAttributes.otl #examplefor: /nodes/sop/copy ``` ```wiki :load_example: #path: /examples/nodes/sop/copy/CopyAttributes ``` ```wiki :load_example: #path: /examples/nodes/sop/copy/CopyAttributes #include: yes ``` ```wiki :load_example: #path: /examples/nodes/sop/copy/CopyAttributes :include /examples/nodes/sop/copy/CopyAttributes: ``` -------------------------------- ### Basic Keyword Search Example Source: https://www.sidefx.com/docs/houdini/help/search This demonstrates a simple word search in Houdini's help documentation. It searches for documents containing both 'render' and 'quality'. ```text render quality ``` -------------------------------- ### Houdini License Partition Rule Example Source: https://www.sidefx.com/docs/houdini/licensing/license_partitioning This Python-like example demonstrates how a license rule is evaluated to determine if a license matches a partition. It shows the comparison of license attributes like product name and version against defined rule conditions. The `condition_matches` variable indicates the outcome of the rule evaluation. ```python """ example license: LICENSE Generic Houdini-Master 19.5 1 17-aug-2022 +.+.+.+ serverA abcdefgh @iH8rRBaJ71wYE7bcgBF2izJ2HUIf example partition rule: product=='Houdini-Master' and version>=19.5 """ # If variable condition_matches is True then the license matches the partition # rule and can be included in the license set. product="Houdini-Master" version=19.5 quantity=1 expiry=17-aug-2022 ip_mask=+.+.+.+ license_id=abcdefgh condition_matches=product=='Houdini-Master' and version>=19.5 ``` -------------------------------- ### Install HQueue Client Silently (Windows) Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted This command installs the HQueue client silently on a Windows machine. It accepts the EULA, specifies the license server, and configures the client to connect to a specified HQueue server. The installation directory and server details are configurable. ```batch houdini-X.X.XXX-win64-vcYYY.exe /S /AcceptEULA=20XX-XX-XX /LicenseServer=No /DesktopIcon=No /FileAssociations=No /HoudiniServer=No /SideFXLabs=No /HQueueClient=Yes /HQClientInstallDir=C:\HQueueClient /HQClientServerName=myServer /HQClientServerPort=5000 ``` -------------------------------- ### Houdini Wiki - List Examples Source: https://www.sidefx.com/docs/houdini/help/createexamples Markup to display a list of example loaders, similar to a search results block. It uses query and groupedby properties to filter and organize the examples shown. ```wiki :list_examples: #query: path:/examples/nodes/sop/* #groupedby: examplefor ``` -------------------------------- ### PDG Node Initialization Example Source: https://www.sidefx.com/docs/houdini/tops/schedulers_callbacks Demonstrates how to access a PDG node in Houdini using Python. This is a basic example often used as a starting point for interacting with PDG nodes. ```python import pdg n = hou.node("/obj/topnet1/out") ``` -------------------------------- ### Enable and Start HQueue Client Service (systemd) Source: https://www.sidefx.com/docs/houdini/hqueue/faqs Enables and starts the HQueue client service on systems using systemd. This ensures the client automatically starts on boot and is running. ```bash sudo systemctl enable hqueue-client sudo systemctl start hqueue-client ``` -------------------------------- ### Using Other Fields for Houdini Help Search Source: https://www.sidefx.com/docs/houdini/help/search Provides examples of other searchable fields like `path`, `namespace`, and `version`. This example searches for documents within the `/ref/panes/*` path. ```text path:/ref/panes/* ``` -------------------------------- ### Houdini Installer Install Command Source: https://www.sidefx.com/docs/houdini/ref/utils/launcher This demonstrates the command to install a new Houdini product or version. It includes mandatory options like product name and EULA acceptance, along with optional parameters for installation directory and platform. ```bash houdini_installer [options] install [install_options] --product <> --version <> [--installdir <>] ``` -------------------------------- ### Enable and Start HQueue Server Service (systemd) Source: https://www.sidefx.com/docs/houdini/hqueue/faqs Enables and starts the HQueue server service on systems using systemd. This ensures the server automatically starts on boot and is running. ```bash sudo systemctl enable hqueue-server sudo systemctl start hqueue-server ``` -------------------------------- ### Install HQueue Server (Windows) Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted Installs the HQueue server on Windows using a silent command-line execution of the Houdini installer. This command specifies installation directory, service name, and enables the HQueue server component. ```shell houdini-X.X.XXX-win64-vcYYY.exe /S /AcceptEULA=20XX-XX-XX /LicenseServer=No /DesktopIcon=No /FileAssociations=No /HoudiniServer=No /SideFXLabs=No /HQueueServer=Yes /Action=install /HQServerInstallDir=C:\\HQueueServer /ServiceName=HQueueServer ``` -------------------------------- ### Houdini Installer Install - Settings File Source: https://www.sidefx.com/docs/houdini/ref/utils/launcher This command shows how to use a settings file to provide configuration details, including login credentials and EULA acceptance, for the Houdini installation process. This is useful for automated or pre-configured installations. ```bash houdini_installer [options] install [install_options] --product <> --version <> --settings-file <> ``` -------------------------------- ### Install HQueue Server with Old Houdini Installer (Linux) Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted This code snippet demonstrates how to install the HQueue server component using the old Houdini installer on a Linux machine. It involves unpacking the tarball, running the installer with sudo, and selecting only the HQueue Server component. The server is typically installed at /opt/hqueue. ```shell tar zxf houdini-X.X.XXX-linux_x86_64_gccY.Y.tar.gz cd houdini-X.X.XXX-linux_x86_64_gccY.Y sudo ./houdini_install ``` -------------------------------- ### Houdini Wiki - Specify Example File Source: https://www.sidefx.com/docs/houdini/help/createexamples A wiki property to explicitly point to the example HDA file when its name does not match the .txt description file. The path can be absolute or relative to the .txt file. ```wiki #examplefile: example.hda ``` -------------------------------- ### Houdini Toggle and Integer Parameter Templates Example Source: https://www.sidefx.com/docs/houdini/network/recipe_format This example illustrates how to define multiple parameter templates, including a toggle and an integer parameter, within a single structure. It showcases how parameters can be linked, such as disabling the 'Start Frame' integer parameter when the 'Enable Start Frame' toggle is off, using 'disable_when' and 'joins_with_next' properties. ```json { "enablestartframe": { "type": "toggle", "label": "Enable Start Frame", "label_hidden": True, "joins_with_next": True, "tags": { "script_callback_language": "python" } }, "startframe": { "type": "integer", "label": "Start Frame", "disable_when": "{ enablestartframe != 1 }", "tags": { "script_callback_language": "python" }, "menu_type": "normal", "default_value": 1, "min_value": 1, "max_value": 240, "strict_min": True } } ``` -------------------------------- ### Houdini ML Node Configuration Example (Python) Source: https://www.sidefx.com/docs/houdini/ref/panes/pdgmltrainingmonitor An example of the dictionary structure returned by the `ml_description` function, defining parameters for generators and discriminators, including plot configurations and test result paths. This configuration guides the PDG ML Training Monitor. ```python [ {'name': 'Generator', 'first_epoch': 10, 'max_epochs': 100, 'plots': [ { 'title': 'Loss', 'x_axis': 'Training Progress', 'y_axis': 'Loss Values', 'x_range': None, 'y_range': None, 'path_format': '/home/user/path/to/csv/loss.csv' }, { 'title': 'SSIM Scores', 'x_axis': 'Training Progress', 'y_axis': 'SSIM Score', 'x_range': None, 'y_range': (0, 1), 'path_format': '/home/user/path/to/csv/ssim.csv' } ], 'test': { 'path_format': '/home/user/path/to/image/{epoch}.{test}.{component}.png', 'count': 2, 'rate': 5, 'components': ['input', 'reference', 'generated'] } }, {'name': 'Discriminator', 'first_epoch': 10, 'max_epochs': 100, 'plots': [ { 'title': 'Discriminator Score', 'x_axis': 'Training Progress', 'y_axis': 'Score', 'x_range': None, 'y_range': (0, 1), 'path_format': '/home/user/path/to/csv/score.csv' } ] } ] ``` -------------------------------- ### Houdini Installer Help Command Source: https://www.sidefx.com/docs/houdini/ref/utils/launcher This command allows users to display help information for specific Houdini installer subcommands and their associated products. This is useful for understanding the detailed options available for each action. ```bash houdini_install [subcommand] [product] --help ``` -------------------------------- ### Adding a Lookat Joint in Houdini Rig Attribute VOP Source: https://www.sidefx.com/docs/houdini/character/kinefx/preparingskeletons This example illustrates adding an extra joint, 'lookat_locator', to a guide skeleton in Houdini using the Rig Attribute VOP. It involves getting the transform of an existing joint (head) and using an Offset Transform VOP to position the new joint, then parenting it to the head joint. ```Houdini VEX/VOPs // Assumes Get Point Transform VOP connected to head joint // Offset Transform VOP used to set Translate // Add Joint VOP used to name the joint 'lookat_locator' // Connection: Get Point Transform VOP ptnum -> Add Joint VOP parent ``` -------------------------------- ### Copy Module Description to Maya Modules Directory (Windows Example) Source: https://www.sidefx.com/docs/houdini/maya/install Demonstrates the process of copying the Houdini Engine for Maya module description file to the Maya modules directory on a Windows system to register the plugin. ```batch copy "C:\Program Files\Side Effects Software\Houdini 17.0.544\engine\maya\maya2018\houdiniEngine-maya2018" "C:\Program Files\Autodesk\Maya2018\modules" ``` -------------------------------- ### Houdini License Checkout Event Example Source: https://www.sidefx.com/docs/houdini/licensing/webhook/e101 An example of a complete event callback for a license checkout in Houdini. This includes metadata like event time and ID, along with the detailed event payload. ```json { "event_time": 1682011410, "event_id": "E101", "type": "event_callback", "event": { "license_id": "abcdefgh", "count": 2, "product": "Houdini-Master", "version": "19.5", "total_tokens": 10, "users": ["user1@machine1", "user2@machine2"] } } ``` -------------------------------- ### Houdini: Applying FK and IK Rig Components using Tags Source: https://www.sidefx.com/docs/houdini/character/kinefx/preparingskeletons This snippet demonstrates configuring Houdini's APEX Autorig Component SOPs to build a character rig. It shows how to use tags on the guide skeleton to specify which joints should receive FK and IK functionality using components like fktransform and multiik. ```Houdini VEX/SOPs // Configuring fktransform component // Component Source: fktransform // Source Tab: // skeleton: Guides.skel // Controls Tab: // tpromotegroup: * // rpromotegroup: * // Configuring bonedeform component // Component Source: bonedeform // Configuring multiik component // Component Source: multiik // Driven Tab: // segments: "*Leg *Arm" ``` -------------------------------- ### Setting MAYA_MODULE_PATH Environment Variable (Linux Example) Source: https://www.sidefx.com/docs/houdini/maya/install Provides an example of setting the MAYA_MODULE_PATH environment variable on Linux to include the Houdini Engine for Maya directory, enabling flexible plugin registration. ```bash export MAYA_MODULE_PATH=/opt/hfs17.5.342/engine/maya ``` -------------------------------- ### Houdini: Tagging Skeleton Joints for Guide Skeleton Source: https://www.sidefx.com/docs/houdini/character/kinefx/preparingskeletons This process involves using the Attribute Adjust Array SOP in Houdini to add string tags to skeleton joints, which are then used to define a guide skeleton. These tags facilitate visualization and downstream rigging operations. ```Houdini VEX/SOPs // Example of setting tags in the Attribute Adjust Array viewer state // This is conceptual as direct VEX for viewer state interaction isn't typical. // The UI is used to input tag names like 'L_Arm', 'R_Leg'. ``` -------------------------------- ### Install Houdini Properties with Folder Specification Source: https://www.sidefx.com/docs/houdini/commands/opproperty Installs specified Houdini properties into a node, overriding default filtering and placing them in a designated folder. The -f option forces installation, while -F specifies the parent folder for the properties. This is useful for organizing custom node setups. ```hscript opproperty -f -F Render /obj/model mantra* *shading* ``` -------------------------------- ### Setting Properties for Controls in Houdini Source: https://www.sidefx.com/docs/houdini/character/kinefx/preparingskeletons This snippet shows how to define properties for guide skeleton joints using the Attribute Adjust Dictionary SOP in Houdini. It specifies which rotations to promote, the shape of the controls, and their scale. This allows for customization of generated rig controls. ```Houdini VEX/SOPs "promote":"r", "shape":"circle_wires", "shapescale":[0.2,0.2,0.2] ``` -------------------------------- ### Start Houdini hwebserver Source: https://www.sidefx.com/docs/houdini/hwebserver/registerStaticFilesDirectory Initiates Houdini's embedded web server. This function should be called after all necessary configurations, such as static file directory registrations or application setups, have been made. The server will then begin listening for incoming HTTP requests. ```python hwebserver.run() ``` -------------------------------- ### Copy Module Description to Maya Modules Directory (Linux Example) Source: https://www.sidefx.com/docs/houdini/maya/install Illustrates how to copy the Houdini Engine for Maya module description file to the Maya modules directory on a Linux system for plugin registration. ```bash cp /opt/hfs17.5.342/engine/maya/maya2018/houdiniEngine-maya2018 /usr/autodesk/maya2018/modules ``` -------------------------------- ### Install Houdini via Command Line on Windows Source: https://www.sidefx.com/docs/houdini/hqueue/faqs Installs Houdini on Windows using the Houdini Launcher's command-line interface. It directs the installation to a network drive and specifies the product, version, settings file, EULA acceptance, and installation directory, ensuring compatibility with HQueue. ```batch cd C:\Program Files\Side Effects Software/Launcher houdini_installer.exe install --product "Houdini" --version X.Y.ZZZ --settings-file C:\path\to\launcher_settings.ini --accept-EULA=SideFX-20XX-XX-XX --installdir H:\houdini_distros\hfs.windows-x86_64 ``` -------------------------------- ### Python: Set Start Frame with Postscript Source: https://www.sidefx.com/docs/houdini/network/recipe_scripting This postscript example sets the 'Start Frame' parameter of an anchor node to the beginning of the current timeline's frame range. It utilizes Houdini's Python API and playbar functions. Requires Houdini's Python API. ```python anchor_node = kwargs['anchor_node'] anchor_node.parm('startframe').set(hou.playbar.frameRange()[0]) ``` -------------------------------- ### hwebserver.run Source: https://www.sidefx.com/docs/houdini/hwebserver/isInDebugMode Starts Houdini's web server. ```APIDOC ## POST /hwebserver/run ### Description Starts Houdini’s web server. It can be configured to run in debug mode. ### Method POST ### Endpoint /hwebserver/run ### Parameters #### Query Parameters - **debug** (bool) - Optional - If True, starts the server in debug mode. ### Request Example POST /hwebserver/run?debug=true ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the server has started. #### Response Example ```json { "message": "Houdini web server started successfully." } ``` ``` -------------------------------- ### Install HQueue Client (macOS) Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted Installs the HQueue client component on macOS. This involves mounting the Houdini DMG, applying the client-specific choices XML, running a client installation script, and unmounting the DMG. ```shell sudo hdiutil detach /Volumes/Houdini sudo hdiutil attach houdini-X.X.XXX-macosx_YYY_clangZZ_ZZ.dmg sudo installer -pkg /Volumes/Houdini/Houdini.pkg -target / -applyChoiceChangesXML /tmp/hqueue_client_install_choices.xml cd /Library/HQueueClient sudo ./install.sh --user myUser --hq-server myServer --hq-server-port 5000 sudo hdiutil detach /Volumes/Houdini ``` -------------------------------- ### Example Houdini Heartbeat Event Callback Source: https://www.sidefx.com/docs/houdini/licensing/webhook/e102 An example of a complete event callback for a Houdini license heartbeat. This structure includes metadata like event time and ID, along with the detailed event payload. It demonstrates how license seat heartbeats are reported. ```json { "event_time": 1682011410, "event_id": "E102", "type": "event_callback", "event": { "license_id": "abcdefgh", "product": "Houdini-Master", "version": "19.5", "success_count": 1, "fail_count": 0, "users": ["user1@machine1"] } } ``` -------------------------------- ### Install HQueue Server (macOS) Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted Installs the HQueue server component on macOS using the installer command. It requires mounting the Houdini DMG, applying the customized choices XML, and then cleaning up by unmounting the DMG. ```shell sudo hdiutil detach /Volumes/Houdini sudo hdiutil attach houdini-X.X.XXX-macosx_YYY_clangZZ_ZZ.dmg sudo installer -pkg /Volumes/Houdini/Houdini.pkg -target / -applyChoiceChangesXML /tmp/hqueue_server_install_choices.xml sudo hdiutil detach /Volumes/Houdini ``` -------------------------------- ### macOS Scripted Installation: Generate Installer Choice XML Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted This command sequence is a prerequisite for scripted Houdini installations on macOS. It involves detaching any previously mounted Houdini installer images and then attaching the new installer image using `hdiutil`. This process is necessary to generate the installer choice XML files required for automated component selection during installation. ```bash # Ensure that no previous Houdini installer image is mounted. sudo hdiutil detach /Volumes/Houdini # Mount the Houdini installer image. sudo hdiutil attach houdini-X.X.XXX-macosx_YYY_clangZZ_ZZ.dmg ``` -------------------------------- ### Houdini HScript Guessing Game Example Source: https://www.sidefx.com/docs/houdini/commands/_guide An example HScript script demonstrating a simple guessing game. It utilizes variables, loops, conditional statements, and HScript functions like system(), substr(), int(), rand(), atof(), echo(), read(), and break. ```hscript # Script for a guessing game (guess.cmd) # First, get a random seed set foo = `system(date)` set seed = `substr($foo, 14, 2)``substr($foo, 17, 2)` # Then, pick a random number set num = `int(rand($seed)*100)+1` set guess = -1 echo Guess a random number between 1 and 100. while ( "$guess" != "$num" ) echo -n Enter guess (q to quit): " read guess if ( "$guess" == q || "$guess" == "") then break; endif # Convert to a number set iguess = `atof($guess)` if ( $iguess < $num ) then echo Too low else if ( $iguess > $num ) then echo Too high else echo Spot on! endif end echo The number was $num ``` -------------------------------- ### Start Houdini Help Server Programmatically in Hython Source: https://www.sidefx.com/docs/houdini/help/central Initiate the Houdini help server within a `hython` script using the `start_server` function from `houdinihelp.server`. This function allows configuration of network interface, port, debug mode, background indexing, configuration file path, and Houdini path usage. Note that `bgindex=None` uses the configuration value, while `True` or `False` overrides it. ```python from houdinihelp.server import start_server start_server( host="0.0.0.0", # Network interface to listen to port=8080, # Port to listen to debug=False, # Whether to start the server in debug mode bgindex=None , # Whether to do background indexing config_file=None, # String path to a config file use_houdini_path=True, # See below ) ``` -------------------------------- ### Get CHOP Input Start Index Source: https://www.sidefx.com/docs/houdini/expressions/bittest Returns the start sample index of a CHOP's input. Typically 0, but can vary based on CHOP configuration. ```Houdini Expression Language ics(chop_path) ``` -------------------------------- ### Install license key with sesictrl Source: https://www.sidefx.com/docs/houdini/ref/utils/sesictrl Installs a license key string to a connected sesinetd server. Requires license information and optionally a hostname. ```bash sesictrl install --license-info --host ``` -------------------------------- ### Get CHOP Input Start Index Source: https://www.sidefx.com/docs/houdini/expressions/boneangle Returns the start sample index of a CHOP's input. Typically 0, but can vary based on CHOP configuration. ```Houdini Expression Language ics(chop_path) ``` -------------------------------- ### USD Referencing Example: Multiple Trash Cans Source: https://www.sidefx.com/docs/houdini/solaris/usd This code demonstrates how to reference a simple trash can asset multiple times within a USD file to place it in different locations within a scene. It shows the 'append references' syntax and how to apply transformations to each referenced instance. ```usda #usda 1.0 ( defaultPrim = "TrashCan" ) def Xform "TrashCan" ( kind = "component" ) { def Cylinder "Can" ( token axis = "Y" bool doubleSided = 0 double height = 2 double radius = 1 ) } ``` ```usda #usda 1.0 () def Xform "Scene" { def Xform "Set" { def "BathroomTrashCan" ( append references = @./trashcan.usda@ ) { double3 xformOp:translate = (2, 0, 1.4) uniform token[] xformOpOrder = ["xformOp:translate"] } def "KitchenTrashCan" ( append references = @./trashcan.usda@ ) { double3 xformOp:translate = (16.01, 5, -43.072) uniform token[] xformOpOrder = ["xformOp:translate"] } def "OfficeTrashCan" ( append references = @./trashcan.usda@ ) { double3 xformOp:translate = (-7.12, 0, 11.9) uniform token[] xformOpOrder = ["xformOp:translate"] } } } ``` -------------------------------- ### USD Layer Example: props.usd Source: https://www.sidefx.com/docs/houdini/solaris/usd This snippet shows a USD layer file named 'props.usd'. It defines material and prim structures, including a 'toy_shader' that references and overrides a material from '/Materials/plastic1'. This demonstrates how local overrides work within a layer. ```usd # props.usd /Materials/ plastic1 /Things/ Toy/ geom toy_shader (references and overrides /Materials/plastic1) ``` -------------------------------- ### Generate Choices XML for Houdini Installation (macOS) Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted Generates an XML file specifying installation choices for Houdini. This file can be modified to customize component selections before installation. It requires the Houdini installer package and writes to a temporary XML file. ```shell installer -showChoiceChangesXML -pkg /Volumes/Houdini/Houdini.pkg -target / &> /tmp/install_choices.xml sudo hdiutil detach /Volumes/Houdini ``` -------------------------------- ### Basic USD Geometry Creation (Cube Example) Source: https://www.sidefx.com/docs/houdini/nodes/lop/labs--biome_plant_scatter_import-1 This example demonstrates creating a USD Cube primitive. LOP nodes like 'Cube' abstract the USD API calls for creating basic shapes. This is often the starting point for procedural asset generation. ```python import hou # Assuming you are in a LOP context lop_node = hou.node('/stage/cube1') # Set parameters for the cube lop_node.parm("size").set(1.0) lop_node.parm("name").set("myCube") # The node itself handles the USD creation when cooked. ``` -------------------------------- ### Get CHOP Input Start Index Source: https://www.sidefx.com/docs/houdini/expressions/bitset Returns the start sample index of a CHOP's input. Typically 0, but can vary based on CHOP configuration. ```Houdini Expression Language ics(chop_path) ``` -------------------------------- ### Houdini Installer Command Structure Source: https://www.sidefx.com/docs/houdini/ref/utils/launcher This shows the general syntax for invoking the Houdini installer utility. It specifies the base command and the structure for including global options, subcommands, and subcommand-specific options. ```bash houdini_installer [global_opts] subcommand [subcommand_opts] ``` -------------------------------- ### Install psycopg2-binary Python Package on Windows Source: https://www.sidefx.com/docs/houdini/hqueue/database Installs the 'psycopg2-binary' Python package on a Windows HQueue server from the command prompt, enabling PostgreSQL database connectivity. ```bash cd C:/HQueueServer/pythonXY/Scripts pip3.exe install psycopg2-binary ``` -------------------------------- ### Houdini Performance Monitor: Start Profile and Record Events (Python) Source: https://www.sidefx.com/docs/houdini/hom/hou/perfMon Demonstrates how to start a new performance monitor profile and record timed events within it using the hou.perfMon module. This example showcases basic profile creation and event timing, useful for analyzing script performance. ```python import hou # Start a new profile. # The profile automatically starts recording. profile = hou.perfMon.startProfile("My Profile") # Example of starting and stopping an event (assuming this code is part of a larger script) # For demonstration, we'll just show the startProfile part as the rest is context dependent. # You would typically call startEvent or startCookEvent here and then event.stop() later. ``` -------------------------------- ### Running Default Houdini Help Server via Command Line Source: https://www.sidefx.com/docs/houdini/help/central This command launches the default Houdini help server (`hwebserver`) with specific configurations. It bypasses certain license modes, binds to all network interfaces on port 8080, and enables background indexing of documents. This is a quick way to start a help server for testing or small deployments. ```bash hhelp --skip-license-modes="commercial,indie,education" serve --host=0.0.0.0 --port=8080 -bgindex=true ``` -------------------------------- ### Get CHOP Input Start Index Source: https://www.sidefx.com/docs/houdini/expressions/bezier Returns the start sample index of a CHOP's input. Typically 0, but can vary based on CHOP configuration. ```Houdini Expression Language ics(chop_path) ``` -------------------------------- ### PDG/TOPs Beginner Tutorials Source: https://www.sidefx.com/docs/houdini/tops/data Provides beginner-friendly tutorials for common workflows using PDG/TOPs, including FX workflows, image manipulation, and HDA processing. ```APIDOC ## PDG/TOPs Beginner Tutorials ### Description This section offers practical, beginner-oriented tutorials to help users get started with PDG/TOPs for specific tasks. ### Tutorials: - **FX Workflow**: Guidance on using PDG/TOPs for visual effects pipelines. - **Image Manipulation**: Applying PDG/TOPs for image processing tasks. - **HDA Processor**: Utilizing PDG/TOPs to process Houdini Digital Assets (HDAs). ``` -------------------------------- ### Houdini Example File Structure Source: https://www.sidefx.com/docs/houdini/help/createexamples Defines the directory structure for custom Houdini example files. It requires an HDA file and a corresponding .txt description file placed within a specific path in the Houdini environment. ```text HOUDINIPATH/ Help/ examples/ nodes/ sop/ mysop/ MyNodeExample.hda MyNodeExample.txt ``` -------------------------------- ### Reboot Machine After Installation (Windows) Source: https://www.sidefx.com/docs/houdini/hqueue/gettingstarted This command reboots the Windows machine to finalize the installation process of the HQueue client. This is a necessary step after the silent installation. ```batch shutdown /r ``` -------------------------------- ### Install Houdini via Command Line on Linux Source: https://www.sidefx.com/docs/houdini/hqueue/faqs Installs Houdini on Linux using the Houdini Launcher's command-line interface. It sets up the installation on a network mount and creates a symbolic link for HQueue. Requires root privileges for installation and symbolic link creation. ```shell cd /opt/sidefx/launcher/bin sudo ./houdini_installer install --product "Houdini" --version X.Y.ZZZ --settings-file /path/to/launcher_settings.ini --accept-EULA=SideFX-20XX-XX-XX --installdir /mnt/myShare/houdini_distros/hfsX.Y.ZZZ-linux-x86_64 cd /mnt/myShare/houdini_distros ln -sf hfsX.Y.ZZZ-linux-x86_64 hfs.linux-x86_64 ``` -------------------------------- ### First Timestep Simulation Check Example Source: https://www.sidefx.com/docs/houdini/nodes/dop/activevalue This example demonstrates the recommended way to check if the current evaluation is the first timestep of a simulation. It uses the $ST variable, which is guaranteed to be zero at the start. ```vex $ST == 0 ``` -------------------------------- ### Webhook Setup Source: https://www.sidefx.com/docs/houdini/licensing/webhook/index Instructions on how to set up a webhook in the Houdini License Server through the hkey application. ```APIDOC ## Webhook Setup ### Description Guides the user through the process of configuring a webhook URL and subscribing to events within the Houdini License Server. ### Method Interactive Dialog ### Endpoint N/A (GUI Configuration) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response None ## Additional Notes 1. Access the webhook dialog via **File ▸ Webhooks…**. 2. Enter the webhook URL (e.g., `https://mycompany.sidefx.webhook:8080/`). 3. Select desired event triggers. ``` -------------------------------- ### HoudiniToolsPackage.json Example Configuration Source: https://www.sidefx.com/docs/houdini/unreal/houdinitools/settings A JSON file example demonstrating how to configure categories, include/exclude patterns for HDAs, and package-level import/export settings for a HoudiniTools Package. ```json { "categories": [ { "name": "(Geo) Deform", "include": [ "deform/*" ], "exclude": [] }, { "name": "(Geo) Scatter", "include": [ "scatter/*" ], "exclude": [ "Scatter/he_geo_fill_scatter" ] } ], "export_package_description": true, "reimport_package_description": false, "reimport_tools_description": true, "export_tools_description": false } ``` -------------------------------- ### Synopsis for iquantize Command Source: https://www.sidefx.com/docs/houdini/ref/utils/iquantize The synopsis defines the basic command-line structure for the iquantize utility. It specifies the required input and output image files and the available optional arguments for controlling quantization and output format. ```bash iquantize [-v] [-G] [-d type] [-n max] [-m method] inimage outimage ``` -------------------------------- ### Houdini: Get Vector Size Source: https://www.sidefx.com/docs/houdini/expressions/ceil Returns the number of elements (components) in a vector. For example, a 3D vector has a size of 3. ```Houdini vsize(vector) ``` -------------------------------- ### Install mysqlclient Python Package on Windows Source: https://www.sidefx.com/docs/houdini/hqueue/database Installs the 'mysqlclient' Python package on a Windows HQueue server from the command prompt, enabling MySQL database connectivity. ```bash cd C:/HQueueServer/pythonXY/Scripts pip3.exe install mysqlclient ``` -------------------------------- ### Start HQueue Client on macOS Source: https://www.sidefx.com/docs/houdini/hqueue/faqs This command loads the HQueue client daemon on macOS, effectively starting the HQueue client service. It requires administrator privileges. ```bash sudo launchctl load -F /Library/LaunchDaemons/com.sidefx.hqclient.plist ``` -------------------------------- ### Example: Move Cameras Before geo1 (HScript) Source: https://www.sidefx.com/docs/houdini/commands/oporder This example demonstrates how to use the 'oporder' command to move all operators whose names start with 'cam' to be positioned before the 'geo1' operator in the network. This helps in visually organizing related nodes. ```HScript oporder cam* geo1 ``` -------------------------------- ### Python API Installation Path Source: https://www.sidefx.com/docs/houdini/nodes/top/shotgunserver Command to find Houdini's Python path for installing the ShotGrid API. Requires manual installation of the API from GitHub. ```bash hython -c 'import sys; print(sys.path)' ``` -------------------------------- ### Houdini: Get Vertex Attribute Size Source: https://www.sidefx.com/docs/houdini/expressions/ceil Returns the number of components in a vertex attribute. For example, a normal attribute might have a size of 3. ```Houdini vertexattribsize(attribute_name) ``` -------------------------------- ### hwebserver.run Source: https://www.sidefx.com/docs/houdini/hwebserver/redirect Starts Houdini's web server. This function is used to initiate the web server process. ```APIDOC ## POST /hwebserver/run ### Description Starts Houdini's web server. ### Method POST ### Endpoint /hwebserver/run ### Parameters No parameters are documented for this function. It is typically called without arguments to start the server. ``` -------------------------------- ### Return Houdini License Source: https://www.sidefx.com/docs/houdini/ref/utils/sesictrl Returns an installed Houdini license back to the entitlement pool. Supports returning multiple licenses by providing a comma-separated list. Accepts optional prompts for scripted setups. ```bash sesictrl return-license aaa,bbb,ccc ``` -------------------------------- ### Example Color Map File for iquantize Source: https://www.sidefx.com/docs/houdini/ref/utils/iquantize This example demonstrates the format of a custom color map file that can be used with the iquantize utility's -m option. The file lists RGB color values, one per line, defining the palette for the quantized image. ```text 0 0 0 85 85 85 170 170 170 255 255 255 ``` -------------------------------- ### Houdini Launcher for Installation Source: https://www.sidefx.com/docs/houdini/ref/utils/abcecho The Houdini Launcher is used to download, install, upgrade, and uninstall Houdini and its components. It simplifies the management of Houdini installations. ```bash houdini_launcher --install 21.0 ``` -------------------------------- ### Filtering Houdini Help by Node Context Source: https://www.sidefx.com/docs/houdini/help/search Shows how to combine type and context fields for precise searching. This example searches for 'copy' only within SOP (Surface Operator) node documentation. ```text copy type:node context:sop ``` -------------------------------- ### Install Houdini to Network Folder via CLI (macOS) Source: https://www.sidefx.com/docs/houdini/hqueue/faqs This code snippet demonstrates how to initiate a Houdini installation to a network folder using the Houdini Launcher's command-line interface on macOS. It requires the network share to be mounted and assumes a standard installation path. ```shell cd /Applications/Houdini Launcher.app/Contents/MacOS # Run the Houdini Launcher's command line interface to install Houdini. # NOTE: This assumes that the network folder is mounted at # /Volumes/myShare and that Houdini is to be installed in the standard ``` -------------------------------- ### Python: Initialize Window Overlay Source: https://www.sidefx.com/docs/houdini/hom/hou/qt/ViewerOverlay Shows the implementation of the `onInitWindow` method, which is called when the overlay window is first initialized. This is a common place to set up the overlay's initial state or UI elements. ```python class MyOnInitOverlay(hou.qt.ViewerOverlay): def onInitWindow(self, event): super(MyOnInitOverlay, self).onInitWindow(event) print("Viewer overlay initialized") # Add your UI setup here ```