The Generic Begin/End Instance Changed Actions

	#include "ofxCore.h"
	#define kOfxActionBeginInstanceChanged "OfxActionBeginInstanceChanged" 
	#define kOfxActionEndInstanceChanged "OfxActionEndInstanceChanged" 
Arguments

  • handle handle to the plug-in instance, cast to an OfxImageEffectHandle
  • inArgs has the following properties...
    • kOfxPropChangeReason - what triggered the change, which will be one of...
      • kOfxChangeUserEdited - the user or host changed the instance somehow and caused a change to something, this includes undo/redos, resets and loading values from files or presets,
      • kOfxChangePluginEdited - the plugin itself has changed the value of the instance in some action
      • kOfxChangeTime - the time has changed and this has affected the value of the object because it varies over time
  • outArgs is redundant and is set to NULL.

Description

kOfxActionBeginInstanceChanged and kOfxActionEndInstanceChanged are used to bracket all kOfxActionInstanceChanged actions, whether a single change or multiple changes. Some changes to a plugin instance can be grouped logically (eg: a 'reset all' button resetting all the instance's parameters), the begin/end instance changed actions allow a plugin to respond appropriately to a large set of changes. For example, a plugin that maintains a complex internal state can delay any changes to that state until all parameter changes have completed.

Preconditions

For kOfxActionBeginInstanceChanged,

  • kOfxActionCreateInstance has been called on the instance handle.

For kOfxActionEndInstanceChanged,

  • kOfxActionBeginInstanceChanged has been called on the instance handle.
  • kOfxActionCreateInstance has been called on the instance handle.

Postconditions

For kOfxActionBeginInstanceChanged,

  • kOfxActionInstanceChanged will be called at least once on the instance handle.
  • kOfxActionEndInstanceChanged will be called on the instance handle.

Return Values

  • kOfxStatOK, the action was trapped and all was well
  • kOfxStatReplyDefault, the action was ignored
  • kOfxStatErrFatal,
  • kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message