|On this page|
This page explains how to create your own node example files and integrate them with the documentation when you are running a custom help server.
To create an example file:
Encapsulate your example inside an object level asset, and save it to an HDA file. The HDA file should only contain one object-level asset.
Include and reference any support files (
.pic, etc.) needed by your example as sections in the HDA file.
.txtfile containing a description of the example, using wiki formating. Give it the same name as the
.hdafile except for the extension. For example,
Place the files somewhere in the Houdini path in:
HOUDINIPATH/ Help/ examples/ nodes/ sop/ mysop/ MyNodeExample.hda MyNodeExample.txt
In the text file describing the example, you can use page properties to control how the server finds the example.
If the text (
.txt) file is not named the same as the example (
.hda) file for some reason, you can use a page property to point to the example file:
The path can be absolute (start with a
/) or relative to the text file.
If you put an example file in
HOUDINIPATH/Help/examples/nodes/nodetype/nodename/, the serve automatically associates the example with that node type.
If you want to associate an example with more than one node type, or put it somewhere else for some reason, you can manually specify a space-separated list of node paths to associate the example with:
#examplefor: /nodes/sop/MyAsset /nodes/dop/HerAsset
You can use loader markup to create buttons in help pages to load example files.
The Copy SOP can be used for more than copying geometry. In this example, the Copy SOP is used to transfer color attributes from the template geometry (or point) to the copied geometry.
A polygonal sphere with color infomation is used as the source geometry. A point with a color attribute (Cd) is extracted from the sphere and used as a template by the Copy SOP. Then the Copy SOP transfers the color infomation to a copied polygonal circle.
load_example block will display a loader for a single Houdini node example.
:load_example: Copy Attributes example #examplefile: /examples/nodes/sop/copy/CopyAttributes.otl #examplefor: /nodes/sop/copy
You can omit the
If you specify a
#path:property pointing to the example’s description (
.txt) page, you can omit the title,
#examplefor. The help system will fill them in from the referenced page.
:load_example: #path: /examples/nodes/sop/copy/CopyAttributes
#include: yesproperty to automatically include the contents of the page referenced in
#pathto the loader:
:load_example: #path: /examples/nodes/sop/copy/CopyAttributes #include: yes
This is the same as:
:load_example: #path: /examples/nodes/sop/copy/CopyAttributes [Include:/examples/nodes/sop/copy/CopyAttributes]
The help system automatically strips the title and summary when it includes in a
list_examples block is like a search list block but displays the results as example loaders.
:list_examples: #query: path:/examples/nodes/sop/* #groupedby: examplefor