Creating custom examples
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. See how to set up a custom help server, especially the section on serving custom example files, for how to set up the server before attempting to add your own examples.
Any time you add or remove one or more examples, you need to re-index the help to make the examples show up on the corresponding node’s help page. See how to set up a custom help server for information on re-indexing.
Overview
An example is an .otl file that loads into either the current Houdini session or a new Houdini session when the user clicks a link in the node help.
To create an example file:
-
Encapsulate your example inside an object level asset, and save it to an OTL file. The OTL file should only contain one object-level asset.
TipInclude and reference any support files (
.bgeo,.pic, etc.) needed by your example as sections in the OTL file. -
Create a
.txtfile containing a description of the example, using wiki formating. Give it the same name as the.otlfile except for the extension. For example,MyNodeExample.otlandMyNodeExample.txt. -
Place the files in an
examples/nodes/nodetype/nodename/directory under a file tree being served by the custom help server.(If you've set the help server’s
exampleprefixoption to the URL of the server, this can be under any of the file trees specified by thedocsoption. If you've setexampleprefixto a network share path, put the example files under that path.)For example, the files under
/mydocs/are being served, and you create an example for theMyAssetSOP, you would save the files as/mydocs/examples/nodes/sop/MyAsset/MyExample.otland/mydocs/examples/nodes/sop/MyAsset/MyExample.txt.See how to set up a custom help server for more information.
Wiki properties
-
If the text (
.txt) file is not named the same as the example (.otl) file for some reason, you can include a#exampleFile: filenameline in the text file to point to the example file. filename is a server path. If it’s not absolute (e.g./examples/nodes/sop/copy/Example.otl) it is relative to the text file’s path. -
By placing an example file in
/examples/nodes/nodetype/nodename/it is automatically assumed to be an example for that node. You can override this to explicitly state which node or nodes the example is for using an#exampleFor: nodelistline in the text file. This is aspace-separated listof one or more server paths of node help pages.For example, to specify that an example is for both the
MyAssetSOP and theHerAssetDOP, put the following in the text description file:#exampleFor: /nodes/sop/MyAsset /nodes/dop/HerAsset