A custom Fx operator is written as a set of pre-defined user functions which define the setup and rendering of an effect. These fall into three main areas:
These user functions communicate with the main body of code via an interface library of support functions. The UFO code is compiled and linked into a Dynamic Shared Object (.so) or Dynamically Linked Library (.dll) which is loaded into Softimage at run-time.
The symbols for the pre-defined functions are searched for in the custom Fx operator and their addresses are tabulated for future calling. The final appearance when the operator is run is as if the functions were directly linked into the product.
The interface library is written with C binding for which the following header files are supplied:
ufoProcess.h: Process interface and general interface. Contains Functions the host provides to the plug-ins to get and set plug-in properties, to be called during plug-in definition and during rendering.
ufoRaster.h: Raster access interface, pixel structures, and constants.
ufoEditor.h: Editor interface. Contains functions the host provides to help implement OpenGL interactive tools.
ufoFunctions.h: The complete set of user functions is declared in the header file. This should be included in the UFO source code files to enforce the correct function prototypes of the functions the UFO plug-in can implement.
ufoUnixCompat.h: Defines rint(), drand48, random, and M_PI for easy portability of plug-ins between Linux and Windows. random is garanteed to have good distribution and provide same results on both platforms, and should be used under Windows instead of the compiler-provided random number generator.
The minimum requirement is that an operator defines ufoProcessDefine, and one of the following: ufoProcessRenderPixel, ufoProcessRenderLine and ufoProcessRender-Rectangle. If this requirement is not met, then the operator process cannot be used and will not appear in Fx tree.
The minimum requirement for screen interaction is that an operator defines ufoEditorCreate, and one of the following: ufoEditorRGBDraw, ufoEditorOverlayDraw, ufoEditorMouseDown, ufoEditorMouseUp, ufoEditorMouseDrag, ufoEditorMousePosition, and ufoEditorKeyEvent.
The minimum requirement for a user-defined X Motif GUI is that anoperator defines both ufoEditorCreate and ufoEditorUpdateGui.