Chapter 13. Actions Passed to An Image Effect

Actions passed to an OFX Image Effect's plug-in main entry point are from two categories...

  • actions that could potentially be issued to any kind of plug in, not just image effects, known as generic actions, found in ofxCore.h
  • actions that are only applicable purely to image effects, found in ofxImageEffect.h

For generic actions, the handle passed to to main entry point will depend on the API being impemented, for all generic actions passed to an OFX Image Effect plug-in, it will nearly alway be an OfxImageEffectHandle .

Because interacts are a special case, they are dealt with in a separate chapter, this chapter will deal with actions issued to an image effect plug-ins main entry point.

The Generic Load Action

	#include "ofxCore.h"
	#define  kOfxActionLoad "OfxActionLoad" 

The handle , inArgs and outArgs arguments to the main entry are redundant and should be set to NULL.


kOfxActionLoad is the first action passed to a plug-in after the binary containing the plug-in has been loaded. It is there to allow a plug-in to create any global data structures it may need and is also when the plug-in should fetch suites from the host.


The plugin's OfxPlugin::setHost function has been called


This action will not be called again while the binary containing the plug-in remains loaded.

Return Values
  • kOfxStatOK, the action was trapped and all was well,
  • kOfxStatReplyDefault, the action was ignored,
  • kOfxStatFailed, the load action failed, no further actions will be passed to the plug-in,
  • kOfxStatErrFatal, fatal error in the plug-in.