The .py Python files need to be installed in the
HOUDINI_PATH, in the
soho subdirectory. The OTL file can be loaded on the command line (or from the File menu after Houdini has started). For example, on Linux:
% cd $HOME/houdini$VERSION % mkdir soho % cp $HFS/toolkit/samples/SOHO/*.py soho % cd $HFS/toolkit/samples/SOHO % houdini hello.otl
After starting Houdini with the OTL, there should be a new output driver "Hello SOHO".
To create your own output driver, choose "New Operator Type" from the File menu in Houdini.
soho_outputmodeand set it's default value to 2.
# Simple "hello world" Python script # On Linux, this will print to the terminal where Houdini was started. # If started graphically, it's unclear where the output goes print 'Hello world'
If you create a
Hello SOHO operator in Houdini, make sure the
soho_program parameter is set to Hello1.py, you should be able to hit the render button on the output driver and see "Hello world" printed out.
If you get an error on the output driver saying that there was "no SOHO program" found this means that the output driver was unable to find the Hello1.py program.
sohosub-directory in the
HOUDINI_PATH. You can do this from within a Houdini textport (or from hbatch) running:
hscript-> echo `findfile("soho/Hello1.py")`
Hello2.pyis a very minor extension to
Hello1.py. Instead of using the Python
Hello3.pyshows how to build a SOHO scene and traverse the objects in the scene. The scene traversal will
$HFS/houdini/soho/, you should find
OGL.py. This example uses the
OpenGLPython modules to open a window and render lit object geometry.
This example performs object parameter evaluation and also shows how to access geometry. You can find more information on these functions in HDK_SOHO or by examining HDK_SOHO_API.