Auto-generated Reference Index
- File list
- File ofxCore.h
- File ofxDialog.h
- File ofxDrawSuite.h
- File ofxGPURender.h
- File ofxImageEffect.h
- File ofxInteract.h
- File ofxKeySyms.h
- File ofxMemory.h
- File ofxMessage.h
- File ofxMultiThread.h
- File ofxOld.h
- File ofxOpenGLRender.h
- File ofxParam.h
- File ofxParametricParam.h
- File ofxPixels.h
- File ofxProgress.h
- File ofxProperty.h
- File ofxTimeLine.h
- Struct list
- Struct OfxDialogSuiteV1
- Struct OfxDrawSuiteV1
- Struct OfxHost
- Struct OfxImageEffectOpenGLRenderSuiteV1
- Struct OfxImageEffectSuiteV1
- Struct OfxInteractSuiteV1
- Struct OfxMemorySuiteV1
- Struct OfxMessageSuiteV1
- Struct OfxMessageSuiteV2
- Struct OfxMultiThreadSuiteV1
- Struct OfxOpenCLProgramSuiteV1
- Struct OfxParameterSuiteV1
- Struct OfxParametricParameterSuiteV1
- Struct OfxPlugin
- Struct OfxPointD
- Struct OfxPointI
- Struct OfxProgressSuiteV1
- Struct OfxProgressSuiteV2
- Struct OfxPropertySuiteV1
- Struct OfxRGBAColourB
- Struct OfxRGBAColourD
- Struct OfxRGBAColourF
- Struct OfxRGBAColourS
- Struct OfxRGBColourB
- Struct OfxRGBColourD
- Struct OfxRGBColourF
- Struct OfxRGBColourS
- Struct OfxRangeD
- Struct OfxRangeI
- Struct OfxRectD
- Struct OfxRectI
- Struct OfxTimeLineSuiteV1
- Struct OfxYUVAColourB
- Struct OfxYUVAColourF
- Struct OfxYUVAColourS
Complete Reference Index
-
struct OfxDialogSuiteV1
- #include <ofxDialog.h>
Public Members
-
OfxStatus (*RequestDialog)(void *user_data)
Request the host to send a kOfxActionDialog to the plugin from its UI thread.
- Pre:
user_data: A pointer to any user data
- Post:
- Return:
kOfxStatOK - The host has queued the request and will send an ‘OfxActionDialog’
kOfxStatFailed - The host has no provisio for this or can not deal with it currently.
-
OfxStatus (*RequestDialog)(void *user_data)
-
struct OfxDrawSuiteV1
- #include <ofxDrawSuite.h>
OFX suite that allows an effect to draw to a host-defined display context.
Public Members
-
OfxStatus (*getColour)(OfxDrawContextHandle context, OfxStandardColour std_colour, OfxRGBAColourF *colour)
Retrieves the host’s desired draw colour for.
context
draw contextstd_colour
desired colour typecolour
returned RGBA colour
- Return:
kOfxStatOK - the colour was returned
kOfxStatErrValue - std_colour was invalid
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*setColour)(OfxDrawContextHandle context, const OfxRGBAColourF *colour)
Sets the colour for future drawing operations (lines, filled shapes and text)
context
draw contextcolour
RGBA colour
- Return:
kOfxStatOK - the colour was changed
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*setLineWidth)(OfxDrawContextHandle context, float width)
Sets the line width for future line drawing operations.
context
draw contextwidth
line width
The host should adjust for screen density.
- Return:
kOfxStatOK - the width was changed
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*setLineStipple)(OfxDrawContextHandle context, OfxDrawLineStipplePattern pattern)
Sets the stipple pattern for future line drawing operations.
context
draw contextpattern
desired stipple pattern
- Return:
kOfxStatOK - the pattern was changed
kOfxStatErrValue - pattern was not valid
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*draw)(OfxDrawContextHandle context, OfxDrawPrimitive primitive, const OfxPointD *points, int point_count)
Draws a primitive of the desired type.
context
draw contextprimitive
desired primitivepoints
array of points in the primitivepoint_count
number of points in the array
- Return:
kOfxStatOK - the draw was completed
kOfxStatErrValue - invalid primitive, or point_count not valid for primitive
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*drawText)(OfxDrawContextHandle context, const char *text, const OfxPointD *pos, int alignment)
Draws text at the specified position.
context
draw contexttext
text to draw (UTF-8 encoded)pos
position at which to align the textalignment
text alignment flags (see kOfxDrawTextAlignment*)
- Return:
kOfxStatOK - the text was drawn
kOfxStatErrValue - text or pos were not defined
kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
-
OfxStatus (*getColour)(OfxDrawContextHandle context, OfxStandardColour std_colour, OfxRGBAColourF *colour)
-
struct OfxHost
- #include <ofxCore.h>
Generic host structure passed to OfxPlugin::setHost function.
This structure contains what is needed by a plug-in to bootstrap its connection to the host.
Public Members
-
OfxPropertySetHandle host
Global handle to the host. Extract relevant host properties from this. This pointer will be valid while the binary containing the plug-in is loaded.
-
const void *(*fetchSuite)(OfxPropertySetHandle host, const char *suiteName, int suiteVersion)
The function which the plug-in uses to fetch suites from the host.
host
the host the suite is being fetched from this must be the host member of the OfxHost struct containing fetchSuite.suiteName
ASCII string labelling the host supplied APIsuiteVersion
version of that suite to fetch
Repeated calls to fetchSuite with the same parameters will return the same pointer.
It is recommended that hosts should return the same host and suite pointers to all plugins in the same shared lib or bundle.
returns
NULL if the API is unknown (either the api or the version requested),
pointer to the relevant API if it was found
-
OfxPropertySetHandle host
-
struct OfxImageEffectOpenGLRenderSuiteV1
- #include <ofxGPURender.h>
OFX suite that provides image to texture conversion for OpenGL processing.
Public Members
-
OfxStatus (*clipLoadTexture)(OfxImageClipHandle clip, OfxTime time, const char *format, const OfxRectD *region, OfxPropertySetHandle *textureHandle)
loads an image from an OFX clip as a texture into OpenGL
clip
clip to load the image fromtime
effect time to load the image fromformat
requested texture format (As in none,byte,word,half,float, etc..) When set to NULL, the host decides the format based on the plug-in’s kOfxOpenGLPropPixelDepth setting.region
region of the image to load (optional, set to NULL to get a ‘default’ region) this is in the CanonicalCoordinates.textureHandle
property set containing information about the texture
With the exception of the OpenGL specifics, these properties are the same as the properties in an image handle returned by clipGetImage in the image effect suite.
Note
this is the OpenGL equivalent of clipGetImage from OfxImageEffectSuiteV1
- Pre:
clip was returned by clipGetHandle
Format property in the texture handle
- Post:
texture handle to be disposed of by clipFreeTexture before the action returns
when the clip specified is the “Output” clip, the format is ignored and the host must bind the resulting texture as the current color buffer (render target). This may also be done prior to calling the render action.
- Return:
kOfxStatOK - the image was successfully fetched and returned in the handle,
kOfxStatFailed - the image could not be fetched because it does not exist in the clip at the indicated time and/or region, the plug-in should continue operation, but assume the image was black and transparent.
kOfxStatErrBadHandle - the clip handle was invalid,
kOfxStatErrMemory - not enough OpenGL memory was available for the effect to load the texture. The plug-in should abort the GL render and return kOfxStatErrMemory, after which the host can decide to retry the operation with CPU based processing.
-
OfxStatus (*clipFreeTexture)(OfxPropertySetHandle textureHandle)
Releases the texture handle previously returned by clipLoadTexture.
For input clips, this also deletes the texture from OpenGL. This should also be called on the output clip; for the Output clip, it just releases the handle but does not delete the texture (since the host will need to read it).
- Pre:
textureHandle was returned by clipGetImage
- Post:
all operations on textureHandle will be invalid, and the OpenGL texture it referred to has been deleted (for source clips)
- Return:
kOfxStatOK - the image was successfully fetched and returned in the handle,
kOfxStatFailed - general failure for some reason,
kOfxStatErrBadHandle - the image handle was invalid,
-
OfxStatus (*flushResources)()
Request the host to minimize its GPU resource load.
When a plug-in fails to allocate GPU resources, it can call this function to request the host to flush its GPU resources if it holds any. After the function the plug-in can try again to allocate resources which then might succeed if the host actually has released anything.
- Pre:
- Post:
No changes to the plug-in GL state should have been made.
- Return:
kOfxStatOK - the host has actually released some resources,
kOfxStatReplyDefault - nothing the host could do..
-
OfxStatus (*clipLoadTexture)(OfxImageClipHandle clip, OfxTime time, const char *format, const OfxRectD *region, OfxPropertySetHandle *textureHandle)
-
struct OfxImageEffectSuiteV1
- #include <ofxImageEffect.h>
The OFX suite for image effects.
This suite provides the functions needed by a plugin to defined and use an image effect plugin.
Public Members
-
OfxStatus (*getPropertySet)(OfxImageEffectHandle imageEffect, OfxPropertySetHandle *propHandle)
Retrieves the property set for the given image effect.
imageEffect
image effect to get the property set forpropHandle
pointer to a the property set pointer, value is returned here
- Return:
kOfxStatOK - the property set was found and returned
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*getParamSet)(OfxImageEffectHandle imageEffect, OfxParamSetHandle *paramSet)
Retrieves the parameter set for the given image effect.
imageEffect
image effect to get the property set forparamSet
pointer to a the parameter set, value is returned here
- Return:
kOfxStatOK - the property set was found and returned
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*clipDefine)(OfxImageEffectHandle imageEffect, const char *name, OfxPropertySetHandle *propertySet)
Define a clip to the effect.
pluginHandle
handle passed into ‘describeInContext’ actionname
unique name of the clip to definepropertySet
property handle for the clip descriptor will be returned here
- Pre:
we are inside the describe in context action.
- Return:
-
OfxStatus (*clipGetHandle)(OfxImageEffectHandle imageEffect, const char *name, OfxImageClipHandle *clip, OfxPropertySetHandle *propertySet)
Get the propery handle of the named input clip in the given instance.
imageEffect
an instance handle to the pluginname
name of the clip, previously used in a clip define callclip
where to return the clippropertySet
if not NULL, the descriptor handle for a parameter’s property set will be placed here.
This return a clip handle for the given instance, note that this will \em not be the same as the clip handle returned by clipDefine and will be distanct to clip handles in any other instance of the plugin. Not a valid call in any of the describe actions.
- Pre:
create instance action called,
name passed to clipDefine for this context,
not inside describe or describe in context actions.
- Post:
handle will be valid for the life time of the instance.
-
OfxStatus (*clipGetPropertySet)(OfxImageClipHandle clip, OfxPropertySetHandle *propHandle)
Retrieves the property set for a given clip.
clip
clip effect to get the property set forpropHandle
pointer to a the property set handle, value is returedn her
- Return:
kOfxStatOK - the property set was found and returned
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*clipGetImage)(OfxImageClipHandle clip, OfxTime time, const OfxRectD *region, OfxPropertySetHandle *imageHandle)
Get a handle for an image in a clip at the indicated time and indicated region.
clip
clip to extract the image fromtime
time to fetch the image atregion
region to fetch the image from (optional, set to NULL to get a ‘default’ region) this is in the CanonicalCoordinates.imageHandle
property set containing the image’s data
If the region parameter is not set to NULL, then it will be clipped to the clip’s Region of Definition for the given time. The returned image will be at least as big as this region. If the region parameter is not set, then the region fetched will be at least the Region of Interest the effect has previously specified, clipped the clip’s Region of Definition.
If clipGetImage is called twice with the same parameters, then two separate image handles will be returned, each of which must be release. The underlying implementation could share image data pointers and use reference counting to maintain them.
- Pre:
clip was returned by clipGetHandle
- Post:
image handle is only valid for the duration of the action clipGetImage is called in
image handle to be disposed of by clipReleaseImage before the action returns
- Return:
kOfxStatOK - the image was successfully fetched and returned in the handle,
kOfxStatFailed - the image could not be fetched because it does not exist in the clip at the indicated time and/or region, the plugin should continue operation, but assume the image was black and transparent.
kOfxStatErrBadHandle - the clip handle was invalid,
kOfxStatErrMemory - the host had not enough memory to complete the operation, plugin should abort whatever it was doing.
-
OfxStatus (*clipReleaseImage)(OfxPropertySetHandle imageHandle)
Releases the image handle previously returned by clipGetImage.
- Pre:
imageHandle was returned by clipGetImage
- Post:
all operations on imageHandle will be invalid
- Return:
kOfxStatOK - the image was successfully fetched and returned in the handle,
kOfxStatErrBadHandle - the image handle was invalid,
-
OfxStatus (*clipGetRegionOfDefinition)(OfxImageClipHandle clip, OfxTime time, OfxRectD *bounds)
Returns the spatial region of definition of the clip at the given time.
clipHandle
clip to extract the image fromtime
time to fetch the image atregion
region to fetch the image from (optional, set to NULL to get a ‘default’ region) this is in the CanonicalCoordinates.imageHandle
handle where the image is returned
If the region parameter is not set to NULL, then it will be clipped to the clip’s Region of Definition for the given time. The returned image will be at least as big as this region. If the region parameter is not set, then the region fetched will be at least the Region of Interest the effect has previously specified, clipped the clip’s Region of Definition.
- Pre:
clipHandle was returned by clipGetHandle
- Post:
bounds will be filled the RoD of the clip at the indicated time
- Return:
kOfxStatOK - the image was successfully fetched and returned in the handle,
kOfxStatFailed - the image could not be fetched because it does not exist in the clip at the indicated time, the plugin should continue operation, but assume the image was black and transparent.
kOfxStatErrBadHandle - the clip handle was invalid,
kOfxStatErrMemory - the host had not enough memory to complete the operation, plugin should abort whatever it was doing.
-
int (*abort)(OfxImageEffectHandle imageEffect)
Returns whether to abort processing or not.
imageEffect
instance of the image effect
This function indicates whether a plugin should stop whatever processing it is doing.
- Return:
0 if the effect should continue whatever processing it is doing
1 if the effect should abort whatever processing it is doing
-
OfxStatus (*imageMemoryAlloc)(OfxImageEffectHandle instanceHandle, size_t nBytes, OfxImageMemoryHandle *memoryHandle)
Allocate memory from the host’s image memory pool.
instanceHandle
effect instance to associate with this memory allocation, may be NULL.nBytes
number of bytes to allocatememoryHandle
pointer to the memory handle where a return value is placed
See ImageEffectsMemoryAllocation.
- Return:
kOfxStatOK if all went well, a valid memory handle is placed in memoryHandle
kOfxStatErrBadHandle if instanceHandle is not valid, memoryHandle is set to NULL
kOfxStatErrMemory if there was not enough memory to satisfy the call, memoryHandle is set to NULL
-
OfxStatus (*imageMemoryFree)(OfxImageMemoryHandle memoryHandle)
Frees a memory handle and associated memory.
memoryHandle
memory handle returned by imageMemoryAlloc
If there are outstanding locks, these are ignored and the handle and memory are freed anyway.
See ImageEffectsMemoryAllocation.
- Return:
kOfxStatOK if the memory was cleanly deleted
kOfxStatErrBadHandle if the value of memoryHandle was not a valid pointer returned by OfxImageEffectSuiteV1::imageMemoryAlloc
-
OfxStatus (*imageMemoryLock)(OfxImageMemoryHandle memoryHandle, void **returnedPtr)
Lock the memory associated with a memory handle and make it available for use.
memoryHandle
memory handle returned by imageMemoryAllocreturnedPtr
where to the pointer to the locked memory
Note that memory locks and unlocks nest.
After the first lock call, the contents of the memory pointer to by returnedPtr is undefined. All subsequent calls to lock will return memory with the same contents as the previous call.
Also, if unlocked, then relocked, the memory associated with a memory handle may be at a different address.
See also OfxImageEffectSuiteV1::imageMemoryUnlock and ImageEffectsMemoryAllocation.
- Return:
kOfxStatOK if the memory was locked, a pointer is placed in returnedPtr
kOfxStatErrBadHandle if the value of memoryHandle was not a valid pointer returned by OfxImageEffectSuiteV1::imageMemoryAlloc, null is placed in *returnedPtr
kOfxStatErrMemory if there was not enough memory to satisfy the call, *returnedPtr is set to NULL
-
OfxStatus (*imageMemoryUnlock)(OfxImageMemoryHandle memoryHandle)
Unlock allocated image data.
allocatedData
pointer to memory previously returned by OfxImageEffectSuiteV1::imageAlloc
Note that locks and unlocks nest, and to fully unlock memory you need to match the count of locks placed upon it.
Also note, if you unlock a completely unlocked handle, it has no effect (ie: the lock count can’t be negative).
If unlocked, then relocked, the memory associated with a memory handle may be at a different address, however the contents will remain the same.
See also OfxImageEffectSuiteV1::imageMemoryLock and ImageEffectsMemoryAllocation.
- Return:
kOfxStatOK if the memory was unlocked cleanly,
kOfxStatErrBadHandle if the value of memoryHandle was not a valid pointer returned by OfxImageEffectSuiteV1::imageMemoryAlloc, null is placed in *returnedPtr
-
OfxStatus (*getPropertySet)(OfxImageEffectHandle imageEffect, OfxPropertySetHandle *propHandle)
-
struct OfxInteractSuiteV1
- #include <ofxInteract.h>
OFX suite that allows an effect to interact with an openGL window so as to provide custom interfaces.
Public Members
-
OfxStatus (*interactSwapBuffers)(OfxInteractHandle interactInstance)
Requests an openGL buffer swap on the interact instance.
-
OfxStatus (*interactRedraw)(OfxInteractHandle interactInstance)
Requests a redraw of the interact instance.
-
OfxStatus (*interactGetPropertySet)(OfxInteractHandle interactInstance, OfxPropertySetHandle *property)
Gets the property set handle for this interact handle.
-
OfxStatus (*interactSwapBuffers)(OfxInteractHandle interactInstance)
-
struct OfxMemorySuiteV1
- #include <ofxMemory.h>
The OFX suite that implements general purpose memory management.
Use this suite for ordinary memory management functions, where you would normally use malloc/free or new/delete on ordinary objects.
For images, you should use the memory allocation functions in the image effect suite, as many hosts have specific image memory pools.
Note
C++ plugin developers will need to redefine new and delete as skins ontop of this suite.
Public Members
-
OfxStatus (*memoryAlloc)(void *handle, size_t nBytes, void **allocatedData)
Allocate memory.
handle
- effect instance to assosciate with this memory allocation, or NULL.nBytes
number of bytes to allocateallocatedData
pointer to the return value. Allocated memory will be alligned for any use.
- Return:
kOfxStatOK the memory was sucessfully allocated
kOfxStatErrMemory the request could not be met and no memory was allocated
-
OfxStatus (*memoryFree)(void *allocatedData)
Frees memory.
allocatedData
pointer to memory previously returned by OfxMemorySuiteV1::memoryAlloc
- Return:
kOfxStatOK the memory was sucessfully freed
kOfxStatErrBadHandle allocatedData was not a valid pointer returned by OfxMemorySuiteV1::memoryAlloc
-
OfxStatus (*memoryAlloc)(void *handle, size_t nBytes, void **allocatedData)
-
struct OfxMessageSuiteV1
- #include <ofxMessage.h>
The OFX suite that allows a plug-in to pass messages back to a user. The V2 suite extends on this in a backwards compatible manner.
Public Members
-
OfxStatus (*message)(void *handle, const char *messageType, const char *messageId, const char *format, ...)
Post a message on the host, using printf style varargs.
handle
effect handle (descriptor or instance) the message should be associated with, may be NULLmessageType
string describing the kind of message to post, one of the kOfxMessageType* constantsmessageId
plugin specified id to associate with this message. If overriding the message in XML resource, the message is identified with this, this may be NULL, or “”, in which case no override will occur,format
printf style format string… printf style varargs list to print
- Return:
kOfxStatOK - if the message was sucessfully posted
kOfxStatReplyYes - if the message was of type kOfxMessageQuestion and the user reply yes
kOfxStatReplyNo - if the message was of type kOfxMessageQuestion and the user reply no
kOfxStatFailed - if the message could not be posted for some reason
-
OfxStatus (*message)(void *handle, const char *messageType, const char *messageId, const char *format, ...)
-
struct OfxMessageSuiteV2
- #include <ofxMessage.h>
The OFX suite that allows a plug-in to pass messages back to a user.
This extends OfxMessageSuiteV1, and should be considered a replacement to version 1.
Note that this suite has been extended in backwards compatible manner, so that a host can return this struct for both V1 and V2.
Public Members
-
OfxStatus (*message)(void *handle, const char *messageType, const char *messageId, const char *format, ...)
Post a transient message on the host, using printf style varargs. Same as the V1 message suite call.
handle
effect handle (descriptor or instance) the message should be associated with, may be nullmessageType
string describing the kind of message to post, one of the kOfxMessageType* constantsmessageId
plugin specified id to associate with this message. If overriding the message in XML resource, the message is identified with this, this may be NULL, or “”, in which case no override will occur,format
printf style format string… printf style varargs list to print
- Return:
kOfxStatOK - if the message was sucessfully posted
kOfxStatReplyYes - if the message was of type kOfxMessageQuestion and the user reply yes
kOfxStatReplyNo - if the message was of type kOfxMessageQuestion and the user reply no
kOfxStatFailed - if the message could not be posted for some reason
-
OfxStatus (*setPersistentMessage)(void *handle, const char *messageType, const char *messageId, const char *format, ...)
Post a persistent message on an effect, using printf style varargs, and set error states. New for V2 message suite.
handle
effect instance handle the message should be associated with, may NOT be null,messageType
string describing the kind of message to post, should be one of…kOfxMessageError
kOfxMessageWarning
kOfxMessageMessage
messageId
plugin specified id to associate with this message. If overriding the message in XML resource, the message is identified with this, this may be NULL, or “”, in which case no override will occur,format
printf style format string… printf style varargs list to print
If messageType is error or warning, associated error states should be flagged on host applications. Posting an error message implies that the host cannot proceeed, a warning allows the host to proceed, whilst a simple message should have no stop anything.
- Return:
kOfxStatOK - if the message was sucessfully posted
kOfxStatErrBadHandle - the handle was rubbish
kOfxStatFailed - if the message could not be posted for some reason
-
OfxStatus (*clearPersistentMessage)(void *handle)
Clears any persistent message on an effect handle that was set by OfxMessageSuiteV2::setPersistentMessage. New for V2 message suite.
handle
effect instance handle messages should be cleared from.handle
effect handle (descriptor or instance)
- Return:
kOfxStatOK - if the message was sucessfully cleared
kOfxStatErrBadHandle - the handle was rubbish
kOfxStatFailed - if the message could not be cleared for some reason
-
OfxStatus (*message)(void *handle, const char *messageType, const char *messageId, const char *format, ...)
-
struct OfxMultiThreadSuiteV1
- #include <ofxMultiThread.h>
OFX suite that provides simple SMP style multi-processing.
Public Members
-
OfxStatus (*multiThread)(OfxThreadFunctionV1 func, unsigned int nThreads, void *customArg)
Function to spawn SMP threads.
func
function to call in each thread.nThreads
number of threads to launchcustomArg
paramter to pass to customArg of func in each thread.
multiThread will not return until all the spawned threads have returned. It is up to the host how it waits for all the threads to return (busy wait, blocking, whatever).
nThreads can be more than the value returned by multiThreadNumCPUs, however the threads will be limitted to the number of CPUs returned by multiThreadNumCPUs.
This function cannot be called recursively.
- Return:
kOfxStatOK, the function func has executed and returned sucessfully
kOfxStatFailed, the threading function failed to launch
kOfxStatErrExists, failed in an attempt to call multiThread recursively,
-
OfxStatus (*multiThreadNumCPUs)(unsigned int *nCPUs)
Function which indicates the number of CPUs available for SMP processing.
nCPUs
pointer to an integer where the result is returned
- Return:
kOfxStatOK, all was OK and the maximum number of threads is in nThreads.
kOfxStatFailed, the function failed to get the number of CPUs
-
OfxStatus (*multiThreadIndex)(unsigned int *threadIndex)
Function which indicates the index of the current thread.
threadIndex
pointer to an integer where the result is returned
If there are no threads currently spawned, then this function will set threadIndex to 0
- Return:
kOfxStatOK, all was OK and the maximum number of threads is in nThreads.
kOfxStatFailed, the function failed to return an index
-
int (*multiThreadIsSpawnedThread)(void)
Function to enquire if the calling thread was spawned by multiThread.
- Return:
0 if the thread is not one spawned by multiThread
1 if the thread was spawned by multiThread
-
OfxStatus (*mutexCreate)(OfxMutexHandle *mutex, int lockCount)
Create a mutex.
mutex
where the new handle is returnedcount
initial lock count on the mutex. This can be negative.
- Return:
kOfxStatOK - mutex is now valid and ready to go
-
OfxStatus (*mutexDestroy)(const OfxMutexHandle mutex)
Destroy a mutex.
Destroys a mutex intially created by mutexCreate.
- Return:
kOfxStatOK - if it destroyed the mutex
kOfxStatErrBadHandle - if the handle was bad
-
OfxStatus (*mutexLock)(const OfxMutexHandle mutex)
Blocking lock on the mutex.
This trys to lock a mutex and blocks the thread it is in until the lock suceeds.
A sucessful lock causes the mutex’s lock count to be increased by one and to block any other calls to lock the mutex until it is unlocked.
- Return:
kOfxStatOK - if it got the lock
kOfxStatErrBadHandle - if the handle was bad
-
OfxStatus (*mutexUnLock)(const OfxMutexHandle mutex)
Unlock the mutex.
This unlocks a mutex. Unlocking a mutex decreases its lock count by one.
- Return:
kOfxStatOK if it released the lock
kOfxStatErrBadHandle if the handle was bad
-
OfxStatus (*mutexTryLock)(const OfxMutexHandle mutex)
Non blocking attempt to lock the mutex.
This attempts to lock a mutex, if it cannot, it returns and says so, rather than blocking.
A sucessful lock causes the mutex’s lock count to be increased by one, if the lock did not suceed, the call returns immediately and the lock count remains unchanged.
- Return:
kOfxStatOK - if it got the lock
kOfxStatFailed - if it did not get the lock
kOfxStatErrBadHandle - if the handle was bad
-
OfxStatus (*multiThread)(OfxThreadFunctionV1 func, unsigned int nThreads, void *customArg)
-
struct OfxOpenCLProgramSuiteV1
- #include <ofxGPURender.h>
OFX suite that allows a plug-in to get OpenCL programs compiled.
This is an optional suite the host can provide for building OpenCL programs for the plug-in, as an alternative to calling clCreateProgramWithSource / clBuildProgram. There are two advantages to doing this: The host can add flags (such as -cl-denorms-are-zero) to the build call, and may also cache program binaries for performance (however, if the source of the program or the OpenCL environment changes, the host must recompile so some mechanism such as hashing must be used).
-
struct OfxParameterSuiteV1
- #include <ofxParam.h>
The OFX suite used to define and manipulate user visible parameters.
Keyframe Handling
These functions allow the plug-in to delete and get information about keyframes.
To set keyframes, use paramSetValueAtTime().
paramGetKeyTime and paramGetKeyIndex use indices to refer to keyframes. Keyframes are stored by the host in increasing time order, so time(kf[i]) < time(kf[i+1]). Keyframe indices will change whenever keyframes are added, deleted, or moved in time, whether by the host or by the plug-in. They may vary between actions if the user changes a keyframe. The keyframe indices will not change within a single action.
-
OfxStatus (*paramGetNumKeys)(OfxParamHandle paramHandle, unsigned int *numberOfKeys)
Returns the number of keyframes in the parameter.
paramHandle
parameter handle to interrogatenumberOfKeys
pointer to integer where the return value is placed
Returns the number of keyframes in the parameter.
- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramGetKeyTime)(OfxParamHandle paramHandle, unsigned int nthKey, OfxTime *time)
Returns the time of the nth key.
paramHandle
parameter handle to interrogatenthKey
which key to ask about (0 to paramGetNumKeys -1), ordered by timetime
pointer to OfxTime where the return value is placed
- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
kOfxStatErrBadIndex - the nthKey does not exist
-
OfxStatus (*paramGetKeyIndex)(OfxParamHandle paramHandle, OfxTime time, int direction, int *index)
Finds the index of a keyframe at/before/after a specified time.
paramHandle
parameter handle to searchtime
what time to search fromdirection
== 0 indicates search for a key at the indicated time (some small delta)
> 0 indicates search for the next key after the indicated time
< 0 indicates search for the previous key before the indicated time
index
pointer to an integer which in which the index is returned set to -1 if no key was found
- Return:
kOfxStatOK - all was OK
kOfxStatFailed - if the search failed to find a key
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramDeleteKey)(OfxParamHandle paramHandle, OfxTime time)
Deletes a keyframe if one exists at the given time.
paramHandle
parameter handle to delete the key fromtime
time at which a keyframe is
- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
kOfxStatErrBadIndex - no key at the given time
-
OfxStatus (*paramDeleteAllKeys)(OfxParamHandle paramHandle)
Deletes all keyframes from a parameter.
paramHandle
parameter handle to delete the keys fromname
parameter to delete the keyframes frome is
- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
Public Members
-
OfxStatus (*paramDefine)(OfxParamSetHandle paramSet, const char *paramType, const char *name, OfxPropertySetHandle *propertySet)
Defines a new parameter of the given type in a describe action.
paramSet
handle to the parameter set descriptor that will hold this parameterparamType
type of the parameter to create, one of the kOfxParamType* #definesname
unique name of the parameterpropertySet
if not null, a pointer to the parameter descriptor’s property set will be placed here.
This function does not actually create a parameter, it only says that one should exist in any subsequent instances. To fetch an parameter instance paramGetHandle must be called on an instance.
This function can always be called in one of a plug-in’s “describe” functions which defines the parameter sets common to all instances of a plugin.
- Return:
kOfxStatOK - the parameter was created correctly
kOfxStatErrBadHandle - if the plugin handle was invalid
kOfxStatErrExists - if a parameter of that name exists already in this plugin
kOfxStatErrUnknown - if the type is unknown
kOfxStatErrUnsupported - if the type is known but unsupported
-
OfxStatus (*paramGetHandle)(OfxParamSetHandle paramSet, const char *name, OfxParamHandle *param, OfxPropertySetHandle *propertySet)
Retrieves the handle for a parameter in a given parameter set.
paramSet
instance of the plug-in to fetch the property handle fromname
parameter to ask aboutparam
pointer to a param handle, the value is returned herepropertySet
if not null, a pointer to the parameter’s property set will be placed here.
- Return:
kOfxStatOK - the parameter was found and returned
kOfxStatErrBadHandle - if the plugin handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*paramSetGetPropertySet)(OfxParamSetHandle paramSet, OfxPropertySetHandle *propHandle)
Retrieves the property set handle for the given parameter set.
paramSet
parameter set to get the property set forpropHandle
pointer to a the property set handle, value is returedn her
Note
The property handle belonging to a parameter set is the same as the property handle belonging to the plugin instance.
- Return:
kOfxStatOK - the property set was found and returned
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*paramGetPropertySet)(OfxParamHandle param, OfxPropertySetHandle *propHandle)
Retrieves the property set handle for the given parameter.
param
parameter to get the property set forpropHandle
pointer to a the property set handle, value is returedn her
- Return:
kOfxStatOK - the property set was found and returned
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*paramGetValue)(OfxParamHandle paramHandle, ...)
Gets the current value of a parameter,.
paramHandle
parameter handle to fetch value from… one or more pointers to variables of the relevant type to hold the parameter’s value
OfxParamHandle myDoubleParam, *myColourParam; ofxHost->paramGetHandle(instance, "myDoubleParam", &myDoubleParam); double myDoubleValue; ofxHost->paramGetValue(myDoubleParam, &myDoubleValue); ofxHost->paramGetHandle(instance, "myColourParam", &myColourParam); double myR, myG, myB; ofxHost->paramGetValue(myColourParam, &myR, &myG, &myB);
Note
paramGetValue
should only be called from within a kOfxActionInstanceChanged or interact action and never from the render actions (which should always use paramGetValueAtTime).- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramGetValueAtTime)(OfxParamHandle paramHandle, OfxTime time, ...)
Gets the value of a parameter at a specific time.
paramHandle
parameter handle to fetch value fromtime
at what point in time to look up the parameter… one or more pointers to variables of the relevant type to hold the parameter’s value
- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramGetDerivative)(OfxParamHandle paramHandle, OfxTime time, ...)
Gets the derivative of a parameter at a specific time.
paramHandle
parameter handle to fetch value fromtime
at what point in time to look up the parameter… one or more pointers to variables of the relevant type to hold the parameter’s derivative
The varargs needs to be pointer to C variables of the relevant type for this parameter. See OfxParameterSuiteV1::paramGetValue for notes on the varags list.
Only double and colour params can have their derivatives found.
- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramGetIntegral)(OfxParamHandle paramHandle, OfxTime time1, OfxTime time2, ...)
Gets the integral of a parameter over a specific time range,.
paramHandle
parameter handle to fetch integral fromtime1
where to start evaluating the integraltime2
where to stop evaluating the integral… one or more pointers to variables of the relevant type to hold the parameter’s integral
The varargs needs to be pointer to C variables of the relevant type for this parameter. See OfxParameterSuiteV1::paramGetValue for notes on the varags list.
Only double and colour params can be integrated.
- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramSetValue)(OfxParamHandle paramHandle, ...)
Sets the current value of a parameter.
paramHandle
parameter handle to set value in… one or more variables of the relevant type to hold the parameter’s value
ofxHost->paramSetValue(instance, "myDoubleParam", double(10)); ofxHost->paramSetValue(instance, "myColourParam", double(pix.r), double(pix.g), double(pix.b));
Note
paramSetValue
should only be called from within a kOfxActionInstanceChanged or interact action.- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramSetValueAtTime)(OfxParamHandle paramHandle, OfxTime time, ...)
Keyframes the value of a parameter at a specific time.
paramHandle
parameter handle to set value intime
at what point in time to set the keyframe… one or more variables of the relevant type to hold the parameter’s value
V1.3: This function can be called the kOfxActionInstanceChanged action and during image effect analysis render passes. V1.4: This function can be called the kOfxActionInstanceChanged action
Note
paramSetValueAtTime
should only be called from within a kOfxActionInstanceChanged or interact action.- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramCopy)(OfxParamHandle paramTo, OfxParamHandle paramFrom, OfxTime dstOffset, const OfxRangeD *frameRange)
Copies one parameter to another, including any animation etc…
paramTo
parameter to setparamFrom
parameter to copy fromdstOffset
temporal offset to apply to keys when writing to the paramToframeRange
if paramFrom has animation, and frameRange is not null, only this range of keys will be copied
To choose all animation in paramFrom set frameRange to [0, 0]
V1.3: This function can be called the kOfxActionInstanceChanged action and during image effect analysis render passes. V1.4: This function can be called the kOfxActionInstanceChanged action
- Pre:
Both parameters must be of the same type.
- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the parameter handle was invalid
-
OfxStatus (*paramEditBegin)(OfxParamSetHandle paramSet, const char *name)
Used to group any parameter changes for undo/redo purposes.
paramSet
the parameter set in which this is happeningname
label to attach to any undo/redo string UTF8
See also OfxParameterSuiteV1::paramEditEnd
Note
paramEditBegin
should only be called from within a kOfxActionInstanceChanged or interact action.- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the instance handle was invalid
-
OfxStatus (*paramEditEnd)(OfxParamSetHandle paramSet)
Used to group any parameter changes for undo/redo purposes.
paramSet
parameter set in which this is happening
See also OfxParameterSuiteV1::paramEditBegin
Note
paramEditEnd
should only be called from within a kOfxActionInstanceChanged or interact action.- Return:
kOfxStatOK - all was OK
kOfxStatErrBadHandle - if the instance handle was invalid
-
OfxStatus (*paramGetNumKeys)(OfxParamHandle paramHandle, unsigned int *numberOfKeys)
-
struct OfxParametricParameterSuiteV1
- #include <ofxParametricParam.h>
The OFX suite used to define and manipulate ‘parametric’ parameters.
This is an optional suite.
Parametric parameters are in effect ‘functions’ a plug-in can ask a host to arbitrarily evaluate for some value ‘x’. A classic use case would be for constructing look-up tables, a plug-in would ask the host to evaluate one at multiple values from 0 to 1 and use that to fill an array.
A host would probably represent this to a user as a cubic curve in a standard curve editor interface, or possibly through scripting. The user would then use this to define the ‘shape’ of the parameter.
The evaluation of such params is not the same as animation, they are returning values based on some arbitrary argument orthogonal to time, so to evaluate such a param, you need to pass a parametric position and time.
Often, you would want such a parametric parameter to be multi-dimensional, for example, a colour look-up table might want three values, one for red, green and blue. Rather than declare three separate parametric parameters, it would be better to have one such parameter with multiple values in it.
The major complication with these parameters is how to allow a plug-in to set values, and defaults. The default default value of a parametric curve is to be an identity lookup. If a plugin wishes to set a different default value for a curve, it can use the suite to set key/value pairs on the descriptor of the param. When a new instance is made, it will have these curve values as a default.
Public Members
-
OfxStatus (*parametricParamGetValue)(OfxParamHandle param, int curveIndex, OfxTime time, double parametricPosition, double *returnValue)
Evaluates a parametric parameter.
param
handle to the parametric parametercurveIndex
which dimension to evaluatetime
the time to evaluate to the parametric param atparametricPosition
the position to evaluate the parametric param atreturnValue
pointer to a double where a value is returned
- Return:
kOfxStatOK - all was fine
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrBadIndex - the curve index was invalid
-
OfxStatus (*parametricParamGetNControlPoints)(OfxParamHandle param, int curveIndex, double time, int *returnValue)
Returns the number of control points in the parametric param.
param
handle to the parametric parametercurveIndex
which dimension to checktime
the time to checkreturnValue
pointer to an integer where the value is returned.
- Return:
kOfxStatOK - all was fine
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrBadIndex - the curve index was invalid
-
OfxStatus (*parametricParamGetNthControlPoint)(OfxParamHandle param, int curveIndex, double time, int nthCtl, double *key, double *value)
Returns the key/value pair of the nth control point.
param
handle to the parametric parametercurveIndex
which dimension to checktime
the time to checknthCtl
the nth control point to get the value ofkey
pointer to a double where the key will be returnedvalue
pointer to a double where the value will be returned
- Return:
kOfxStatOK - all was fine
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*parametricParamSetNthControlPoint)(OfxParamHandle param, int curveIndex, double time, int nthCtl, double key, double value, bool addAnimationKey)
Modifies an existing control point on a curve.
param
handle to the parametric parametercurveIndex
which dimension to settime
the time to set the value atnthCtl
the control point to modifykey
key of the control pointvalue
value of the control pointaddAnimationKey
if the param is an animatable, setting this to true will force an animation keyframe to be set as well as a curve key, otherwise if false, a key will only be added if the curve is already animating.
- Return:
kOfxStatOK - all was fine
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*parametricParamAddControlPoint)(OfxParamHandle param, int curveIndex, double time, double key, double value, bool addAnimationKey)
Adds a control point to the curve.
param
handle to the parametric parametercurveIndex
which dimension to settime
the time to set the value atkey
key of the control pointvalue
value of the control pointaddAnimationKey
if the param is an animatable, setting this to true will force an animation keyframe to be set as well as a curve key, otherwise if false, a key will only be added if the curve is already animating.
- Return:
kOfxStatOK - all was fine
kOfxStatErrBadHandle - if the paramter handle was invalid
kOfxStatErrUnknown - if the type is unknown
-
OfxStatus (*parametricParamDeleteControlPoint)(OfxParamHandle param, int curveIndex, int nthCtl)
Deletes the nth control point from a parametric param.
param
handle to the parametric parametercurveIndex
which dimension to deletenthCtl
the control point to delete
-
OfxStatus (*parametricParamDeleteAllControlPoints)(OfxParamHandle param, int curveIndex)
Delete all curve control points on the given param.
param
handle to the parametric parametercurveIndex
which dimension to clear
-
OfxStatus (*parametricParamGetValue)(OfxParamHandle param, int curveIndex, OfxTime time, double parametricPosition, double *returnValue)
-
struct OfxPlugin
- #include <ofxCore.h>
The structure that defines a plug-in to a host.
This structure is the first element in any plug-in structure using the OFX plug-in architecture. By examining its members a host can determine the API that the plug-in implements, the version of that API, its name and version.
For details see Architecture.
Public Members
-
const char *pluginApi
Defines the type of the plug-in, this will tell the host what the plug-in does. e.g.: an image effects plug-in would be a “OfxImageEffectPlugin”
-
int apiVersion
Defines the version of the pluginApi that this plug-in implements
-
const char *pluginIdentifier
String that uniquely labels the plug-in among all plug-ins that implement an API. It need not necessarily be human sensible, however the preference is to use reverse internet domain name of the developer, followed by a ‘.’ then by a name that represents the plug-in.. It must be a legal ASCII string and have no whitespace in the name and no non printing chars. For example “uk.co.somesoftwarehouse.myPlugin”
-
unsigned int pluginVersionMajor
Major version of this plug-in, this gets incremented when backwards compatibility is broken.
-
unsigned int pluginVersionMinor
Major version of this plug-in, this gets incremented when software is changed, but does not break backwards compatibility.
-
void (*setHost)(OfxHost *host)
Function the host uses to connect the plug-in to the host’s api fetcher.
fetchApi
pointer to host’s API fetcher
The very first function called in a plug-in. The plug-in must not call any OFX functions within this, it must only set its local copy of the host pointer.
It is recommended that hosts should return the same host and suite pointers to all plugins in the same shared lib or bundle.
- Pre:
nothing else has been called
- Post:
the pointer suite is valid until the plug-in is unloaded
-
OfxPluginEntryPoint *mainEntry
Main entry point for plug-ins.
Mandatory function.
The exact set of actions is determined by the plug-in API that is being implemented, however all plug-ins can perform several actions. For the list of actions consult OFX Actions.
Preconditions
setHost has been called
-
const char *pluginApi
-
struct OfxProgressSuiteV1
- #include <ofxProgress.h>
A suite that provides progress feedback from a plugin to an application.
A plugin instance can initiate, update and close a progress indicator with this suite.
This is an optional suite in the Image Effect API.
API V1.4: Amends the documentation of progress suite V1 so that it is expected that it can be raised in a modal manner and have a “cancel” button when invoked in instanceChanged. Plugins that perform analysis post an appropriate message, raise the progress monitor in a modal manner and should poll to see if processing has been aborted. Any cancellation should be handled gracefully by the plugin (eg: reset analysis parameters to default values), clear allocated memory…
Many hosts already operate as described above. kOfxStatReplyNo should be returned to the plugin during progressUpdate when the user presses cancel.
Suite V2: Adds an ID that can be looked up for internationalisation and so on. When a new version is introduced, because plug-ins need to support old versions, and plug-in’s new releases are not necessary in synch with hosts (or users don’t immediately update), best practice is to support the 2 suite versions. That is, the plugin should check if V2 exists; if not then check if V1 exists. This way a graceful transition is guaranteed. So plugin should fetchSuite passing 2, (OfxProgressSuiteV2*) fetchSuite(mHost->mHost->host, kOfxProgressSuite,2); and if no success pass (OfxProgressSuiteV1*) fetchSuite(mHost->mHost->host, kOfxProgressSuite,1);
Public Members
-
OfxStatus (*progressStart)(void *effectInstance, const char *label)
Initiate a progress bar display.
Call this to initiate the display of a progress bar.
effectInstance
the instance of the plugin this progress bar is associated with. It cannot be NULL.label
a text label to display in any message portion of the progress object’s user interface. A UTF8 string.
- Pre:
- There is no currently ongoing progress display for this instance.
- Return:
kOfxStatOK - the handle is now valid for use
kOfxStatFailed - the progress object failed for some reason
kOfxStatErrBadHandle - effectInstance was invalid
-
OfxStatus (*progressUpdate)(void *effectInstance, double progress)
Indicate how much of the processing task has been completed and reports on any abort status.
effectInstance
the instance of the plugin this progress bar is associated with. It cannot be NULL.progress
a number between 0.0 and 1.0 indicating what proportion of the current task has been processed.
- Return:
kOfxStatOK - the progress object was successfully updated and the task should continue
kOfxStatReplyNo - the progress object was successfully updated and the task should abort
kOfxStatErrBadHandle - the progress handle was invalid,
-
OfxStatus (*progressEnd)(void *effectInstance)
Signal that we are finished with the progress meter.
Call this when you are done with the progress meter and no longer need it displayed.
effectInstance
the instance of the plugin this progress bar is associated with. It cannot be NULL.
- Post:
- you can no longer call progressUpdate on the instance
- Return:
kOfxStatOK - the progress object was successfully closed
kOfxStatErrBadHandle - the progress handle was invalid,
-
OfxStatus (*progressStart)(void *effectInstance, const char *label)
-
struct OfxProgressSuiteV2
- #include <ofxProgress.h>
Public Members
-
OfxStatus (*progressStart)(void *effectInstance, const char *message, const char *messageid)
Initiate a progress bar display.
Call this to initiate the display of a progress bar.
effectInstance
the instance of the plugin this progress bar is associated with. It cannot be NULL.message
a text label to display in any message portion of the progress object’s user interface. A UTF8 string.messageId
plugin-specified id to associate with this message. If overriding the message in an XML resource, the message is identified with this, this may be NULL, or “”, in which case no override will occur. New in V2 of this suite.
- Pre:
- There is no currently ongoing progress display for this instance.
- Return:
kOfxStatOK - the handle is now valid for use
kOfxStatFailed - the progress object failed for some reason
kOfxStatErrBadHandle - effectInstance was invalid
-
OfxStatus (*progressUpdate)(void *effectInstance, double progress)
Indicate how much of the processing task has been completed and reports on any abort status.
effectInstance
the instance of the plugin this progress bar is associated with. It cannot be NULL.progress
a number between 0.0 and 1.0 indicating what proportion of the current task has been processed.
- Return:
kOfxStatOK - the progress object was successfully updated and the task should continue
kOfxStatReplyNo - the progress object was successfully updated and the task should abort
kOfxStatErrBadHandle - the progress handle was invalid,
-
OfxStatus (*progressEnd)(void *effectInstance)
Signal that we are finished with the progress meter.
Call this when you are done with the progress meter and no longer need it displayed.
effectInstance
the instance of the plugin this progress bar is associated with. It cannot be NULL.
- Post:
- you can no longer call progressUpdate on the instance
- Return:
kOfxStatOK - the progress object was successfully closed
kOfxStatErrBadHandle - the progress handle was invalid,
-
OfxStatus (*progressStart)(void *effectInstance, const char *message, const char *messageid)
-
struct OfxPropertySuiteV1
- #include <ofxProperty.h>
The OFX suite used to access properties on OFX objects.
Public Members
-
OfxStatus (*propSetPointer)(OfxPropertySetHandle properties, const char *property, int index, void *value)
Set a single value in a pointer property.
properties
handle of the thing holding the propertyproperty
string labelling the propertyindex
for multidimenstional properties and is dimension of the one we are settingvalue
value of the property we are setting
-
OfxStatus (*propSetString)(OfxPropertySetHandle properties, const char *property, int index, const char *value)
Set a single value in a string property.
properties
handle of the thing holding the propertyproperty
string labelling the propertyindex
for multidimenstional properties and is dimension of the one we are settingvalue
value of the property we are setting
-
OfxStatus (*propSetDouble)(OfxPropertySetHandle properties, const char *property, int index, double value)
Set a single value in a double property.
properties
handle of the thing holding the propertyproperty
string labelling the propertyindex
for multidimenstional properties and is dimension of the one we are settingvalue
value of the property we are setting
-
OfxStatus (*propSetInt)(OfxPropertySetHandle properties, const char *property, int index, int value)
Set a single value in an int property.
properties
handle of the thing holding the propertyproperty
string labelling the propertyindex
for multidimenstional properties and is dimension of the one we are settingvalue
value of the property we are setting
-
OfxStatus (*propSetPointerN)(OfxPropertySetHandle properties, const char *property, int count, void *const *value)
Set multiple values of the pointer property.
properties
handle of the thing holding the propertyproperty
string labelling the propertycount
number of values we are setting in that property (ie: indicies 0..count-1)value
pointer to an array of property values
-
OfxStatus (*propSetStringN)(OfxPropertySetHandle properties, const char *property, int count, const char *const *value)
Set multiple values of a string property.
properties
handle of the thing holding the propertyproperty
string labelling the propertycount
number of values we are setting in that property (ie: indicies 0..count-1)value
pointer to an array of property values
-
OfxStatus (*propSetDoubleN)(OfxPropertySetHandle properties, const char *property, int count, const double *value)
Set multiple values of a double property.
properties
handle of the thing holding the propertyproperty
string labelling the propertycount
number of values we are setting in that property (ie: indicies 0..count-1)value
pointer to an array of property values
-
OfxStatus (*propSetIntN)(OfxPropertySetHandle properties, const char *property, int count, const int *value)
Set multiple values of an int property.
properties
handle of the thing holding the propertyproperty
string labelling the propertycount
number of values we are setting in that property (ie: indicies 0..count-1)value
pointer to an array of property values
-
OfxStatus (*propGetPointer)(OfxPropertySetHandle properties, const char *property, int index, void **value)
Get a single value from a pointer property.
properties
handle of the thing holding the propertyproperty
string labelling the propertyindex
refers to the index of a multi-dimensional propertyvalue
pointer the return location
-
OfxStatus (*propGetString)(OfxPropertySetHandle properties, const char *property, int index, char **value)
Get a single value of a string property.
properties
handle of the thing holding the propertyproperty
string labelling the propertyindex
refers to the index of a multi-dimensional propertyvalue
pointer the return location
-
OfxStatus (*propGetDouble)(OfxPropertySetHandle properties, const char *property, int index, double *value)
Get a single value of a double property.
properties
handle of the thing holding the propertyproperty
string labelling the propertyindex
refers to the index of a multi-dimensional propertyvalue
pointer the return location
-
OfxStatus (*propGetInt)(OfxPropertySetHandle properties, const char *property, int index, int *value)
Get a single value of an int property.
properties
handle of the thing holding the propertyproperty
string labelling the propertyindex
refers to the index of a multi-dimensional propertyvalue
pointer the return location
-
OfxStatus (*propGetPointerN)(OfxPropertySetHandle properties, const char *property, int count, void **value)
Get multiple values of a pointer property.
properties
handle of the thing holding the propertyproperty
string labelling the propertycount
number of values we are getting of that property (ie: indicies 0..count-1)value
pointer to an array of where we will return the property values
-
OfxStatus (*propGetStringN)(OfxPropertySetHandle properties, const char *property, int count, char **value)
Get multiple values of a string property.
properties
handle of the thing holding the propertyproperty
string labelling the propertycount
number of values we are getting of that property (ie: indicies 0..count-1)value
pointer to an array of where we will return the property values
-
OfxStatus (*propGetDoubleN)(OfxPropertySetHandle properties, const char *property, int count, double *value)
Get multiple values of a double property.
properties
handle of the thing holding the propertyproperty
string labelling the propertycount
number of values we are getting of that property (ie: indicies 0..count-1)value
pointer to an array of where we will return the property values
-
OfxStatus (*propGetIntN)(OfxPropertySetHandle properties, const char *property, int count, int *value)
Get multiple values of an int property.
properties
handle of the thing holding the propertyproperty
string labelling the propertycount
number of values we are getting of that property (ie: indicies 0..count-1)value
pointer to an array of where we will return the property values
-
OfxStatus (*propReset)(OfxPropertySetHandle properties, const char *property)
Resets all dimensions of a property to its default value.
properties
handle of the thing holding the propertyproperty
string labelling the property we are resetting
-
OfxStatus (*propGetDimension)(OfxPropertySetHandle properties, const char *property, int *count)
Gets the dimension of the property.
properties
handle of the thing holding the propertyproperty
string labelling the property we are resettingcount
pointer to an integer where the value is returned
-
OfxStatus (*propSetPointer)(OfxPropertySetHandle properties, const char *property, int index, void *value)
-
struct OfxRectD
- #include <ofxCore.h>
Defines two dimensional double region.
Regions are x1 <= x < x2
Infinite regions are flagged by setting
x1 = kOfxFlagInfiniteMin
y1 = kOfxFlagInfiniteMin
x2 = kOfxFlagInfiniteMax
y2 = kOfxFlagInfiniteMax
-
struct OfxRectI
- #include <ofxCore.h>
Defines two dimensional integer region.
Regions are x1 <= x < x2
Infinite regions are flagged by setting
x1 = kOfxFlagInfiniteMin
y1 = kOfxFlagInfiniteMin
x2 = kOfxFlagInfiniteMax
y2 = kOfxFlagInfiniteMax
-
struct OfxRGBAColourB
- #include <ofxPixels.h>
Defines an 8 bit per component RGBA pixel.
-
struct OfxRGBAColourD
- #include <ofxPixels.h>
Defines a double precision floating point component RGBA pixel.
-
struct OfxRGBAColourF
- #include <ofxPixels.h>
Defines a floating point component RGBA pixel.
-
struct OfxRGBAColourS
- #include <ofxPixels.h>
Defines a 16 bit per component RGBA pixel.
-
struct OfxRGBColourB
- #include <ofxPixels.h>
Defines an 8 bit per component RGB pixel.
-
struct OfxRGBColourD
- #include <ofxPixels.h>
Defines a double precision floating point component RGB pixel.
-
struct OfxRGBColourF
- #include <ofxPixels.h>
Defines a floating point component RGB pixel.
-
struct OfxRGBColourS
- #include <ofxPixels.h>
Defines a 16 bit per component RGB pixel.
-
struct OfxTimeLineSuiteV1
- #include <ofxTimeLine.h>
Suite to control timelines.
This suite is used to enquire and control a timeline associated with a plug-in instance.
This is an optional suite in the Image Effect API.
Public Members
-
OfxStatus (*getTime)(void *instance, double *time)
Get the time value of the timeline that is controlling to the indicated effect.
instance
is the instance of the effect changing the timeline, cast to a void *time
pointer through which the timeline value should be returned
- Return:
kOfxStatOK - the time enquiry was sucessful
kOfxStatFailed - the enquiry failed for some host specific reason
kOfxStatErrBadHandle - the effect handle was invalid
-
OfxStatus (*gotoTime)(void *instance, double time)
Move the timeline control to the indicated time.
instance
is the instance of the effect changing the timeline, cast to a void *time
is the time to change the timeline to. This is in the temporal coordinate system of the effect.
- Return:
kOfxStatOK - the time was changed sucessfully, will all side effects if the change completed
kOfxStatFailed - the change failed for some host specific reason
kOfxStatErrBadHandle - the effect handle was invalid
kOfxStatErrValue - the time was an illegal value
-
OfxStatus (*getTimeBounds)(void *instance, double *firstTime, double *lastTime)
Get the current bounds on a timeline.
instance
is the instance of the effect changing the timeline, cast to a void *firstTime
is the first time on the timeline. This is in the temporal coordinate system of the effect.lastTime
is last time on the timeline. This is in the temporal coordinate system of the effect.
- Return:
kOfxStatOK - the time enquiry was sucessful
kOfxStatFailed - the enquiry failed for some host specific reason
kOfxStatErrBadHandle - the effect handle was invalid
-
OfxStatus (*getTime)(void *instance, double *time)
-
struct OfxYUVAColourB
- #include <ofxOld.h>
Defines an 8 bit per component YUVA pixel — ofxPixels.h Deprecated in 1.3, removed in 1.4.
-
struct OfxYUVAColourF
- #include <ofxOld.h>
Defines an floating point component YUVA pixel — ofxPixels.h.
- Deprecated:
Deprecated in 1.3, removed in 1.4
-
struct OfxYUVAColourS
- #include <ofxOld.h>
Defines an 16 bit per component YUVA pixel — ofxPixels.h.
- Deprecated:
Deprecated in 1.3, removed in 1.4
- file ofxCore.h
- #include “stddef.h”#include <limits.h>
Contains the core OFX architectural struct and function definitions. For more details on the basic OFX architecture, see Architecture.
Defines
-
OfxExport
Platform independent export macro.
This macro is to be used before any symbol that is to be exported from a plug-in. This is OS/compiler dependent.
-
kOfxActionLoad
This action 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 handle, inArgs and outArgs arguments to the mainEntry are redundant and should be set to NULL.
- Pre:
The plugin’s OfxPlugin::setHost function has been called
- Post:
This action will not be called again while the binary containing the plug-in remains loaded.
- Returns:
kOfxStatOK, the action was trapped and all was well,
kOfxStatReplyDefault, the action was ignored,
, the load action failed, no further actions will be passed to the plug-in. Interpret if possible kOfxStatFailed as plug-in indicating it does not want to load Do not create an entry in the host’s UI for plug-in then.
Plug-in also has the option to return 0 for OfxGetNumberOfPlugins or kOfxStatFailed if host supports OfxSetHost in which case kOfxActionLoad will never be called.
kOfxStatErrFatal, fatal error in the plug-in.
-
kOfxActionDescribe
The kOfxActionDescribe is the second action passed to a plug-in. It is where a plugin defines how it behaves and the resources it needs to function.
Note that the handle passed in acts as a descriptor for, rather than an instance of the plugin. The handle is global and unique. The plug-in is at liberty to cache the handle away for future reference until the plug-in is unloaded.
Most importantly, the effect must set what image effect contexts it is capable of working in.
This action must be trapped, it is not optional.
- Parameters:
handle – handle to the plug-in descriptor, cast to an OfxImageEffectHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionLoad has been called
- Post:
kOfxActionDescribe will not be called again, unless it fails and returns one of the error codes where the host is allowed to attempt the action again
the handle argument, being the global plug-in description handle, is a valid handle from the end of a sucessful describe action until the end of the kOfxActionUnload action (ie: the plug-in can cache it away without worrying about it changing between actions).
kOfxImageEffectActionDescribeInContext will be called once for each context that the host and plug-in mutually support. If a plug-in does not report to support any context supported by host, host should not enable the plug-in.
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatErrMissingHostFeature, in which the plugin will be unloaded and ignored, plugin may post message
kOfxStatErrMemory, in which case describe may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxActionUnload
This action is the last action passed to the plug-in before the binary containing the plug-in is unloaded. It is there to allow a plug-in to destroy any global data structures it may have created.
The handle, inArgs and outArgs arguments to the main entry are redundant and should be set to NULL.
- Pre:
the kOfxActionLoad action has been called
all instances of a plugin have been destroyed
- Post:
No other actions will be called.
- Returns:
kOfxStatOK, the action was trapped all was well
kOfxStatReplyDefault, the action was ignored
kOfxStatErrFatal, in which case we the program will be forced to quit
-
kOfxActionPurgeCaches
This action is an action that may be passed to a plug-in instance from time to time in low memory situations. Instances recieving this action should destroy any data structures they may have and release the associated memory, they can later reconstruct this from the effect’s parameter set and associated information.
For Image Effects, it is generally a bad idea to call this after each render, but rather it should be called after kOfxImageEffectActionEndSequenceRender Some effects, typically those flagged with the kOfxImageEffectInstancePropSequentialRender property, may need to cache information from previously rendered frames to function correctly, or have data structures that are expensive to reconstruct at each frame (eg: a particle system). Ideally, such effect should free such structures during the kOfxImageEffectActionEndSequenceRender action.
- Parameters:
handle – handle to the plug-in instance, cast to an OfxImageEffectHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored
kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message
-
kOfxActionSyncPrivateData
This action is called when a plugin should synchronise any private data structures to its parameter set. This generally occurs when an effect is about to be saved or copied, but it could occur in other situations as well.
- Parameters:
handle – handle to the plug-in instance, cast to an OfxImageEffectHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
- Post:
Any private state data can be reconstructed from the parameter set,
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored
kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message
-
kOfxActionCreateInstance
This action is the first action passed to a plug-in’s instance after its creation. It is there to allow a plugin to create any per-instance data structures it may need.
- Parameters:
handle – handle to the plug-in instance, cast to an OfxImageEffectHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionDescribe has been called
the instance is fully constructed, with all objects requested in the describe actions (eg, parameters and clips) have been constructed and have had their initial values set. This means that if the values are being loaded from an old setup, that load should have taken place before the create instance action is called.
- Post:
the instance pointer will be valid until the kOfxActionDestroyInstance action is passed to the plug-in with the same instance handle
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored, but all was well anyway
kOfxStatErrMemory, in which case this may be called again after a memory purge
kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message if possible and the host should destroy the instanace handle and not attempt to proceed further
-
kOfxActionDestroyInstance
This action is the last passed to a plug-in’s instance before its destruction. It is there to allow a plugin to destroy any per-instance data structures it may have created.
kOfxStatOK, the action was trapped and all was well,
kOfxStatReplyDefault, the action was ignored as the effect had nothing to do,
kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message.
- Parameters:
handle – handle to the plug-in instance, cast to an OfxImageEffectHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the handle,
the instance has not had any of its members destroyed yet,
- Post:
the instance pointer is no longer valid and any operation on it will be undefined
- Returns:
To some extent, what is returned is moot, a bit like throwing an exception in a C++ destructor, so the host should continue destruction of the instance regardless.
-
kOfxActionInstanceChanged
This action signals that something has changed in a plugin’s instance, either by user action, the host or the plugin itself. All change actions are bracketed by a pair of kOfxActionBeginInstanceChanged and kOfxActionEndInstanceChanged actions. The
inArgs
property set is used to determine what was the thing inside the instance that was changed.- Parameters:
handle – handle to the plug-in instance, cast to an OfxImageEffectHandle
inArgs – has the following properties
kOfxPropType The type of the thing that changed which will be one of..
kOfxTypeParameter Indicating a parameter’s value has changed in some way
kOfxTypeClip A clip to an image effect has changed in some way (for Image Effect Plugins only)
kOfxPropName the name of the thing that was changed in the instance
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
the effect time at which the chang occured (for Image Effect Plugins only)
the render scale currently being applied to any image fetched from a clip (for Image Effect Plugins only)
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
kOfxActionBeginInstanceChanged has been called on the instance handle.
- Post:
kOfxActionEndInstanceChanged will be called on the instance handle.
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored
kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message
-
kOfxActionBeginInstanceChanged
The kOfxActionBeginInstanceChanged and kOfxActionEndInstanceChanged actions 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.
- Parameters:
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
- Post:
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.
- Post:
For kOfxActionBeginInstanceChanged, kOfxActionInstanceChanged will be called at least once on the instance handle.
kOfxActionEndInstanceChanged will be called on the instance handle.
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored
kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message
-
kOfxActionEndInstanceChanged
Action called after the end of a set of kOfxActionEndInstanceChanged actions, used with kOfxActionBeginInstanceChanged to bracket a grouped set of changes, see kOfxActionBeginInstanceChanged.
-
kOfxActionBeginInstanceEdit
This is called when an instance is first actively edited by a user, ie: and interface is open and parameter values and input clips can be modified. It is there so that effects can create private user interface structures when necassary. Note that some hosts can have multiple editors open on the same effect instance simulateously.
- Parameters:
handle – handle to the plug-in instance, cast to an OfxImageEffectHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
- Post:
kOfxActionEndInstanceEdit will be called when the last editor is closed on the instance
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored
kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message
-
kOfxActionEndInstanceEdit
This is called when the last user interface on an instance closed. It is there so that effects can destroy private user interface structures when necassary. Note that some hosts can have multiple editors open on the same effect instance simulateously, this will only be called when the last of those editors are closed.
- Parameters:
handle – handle to the plug-in instance, cast to an OfxImageEffectHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionBeginInstanceEdit has been called on the instance handle,
- Post:
no user interface is open on the instance
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored
kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message
-
kOfxPropAPIVersion
Property on the host descriptor, saying what API version of the API is being implemented.
Type - int X N
Property Set - host descriptor.
This is a version string that will specify which version of the API is being implemented by a host. It can have multiple values. For example “1.0”, “1.2.4” etc…..
If this is not present, it is safe to assume that the version of the API is “1.0”.
-
kOfxPropTime
General property used to get/set the time of something.
Type - double X 1
Default - 0, if a setable property
Property Set - commonly used as an argument to actions, input and output.
-
kOfxPropIsInteractive
Indicates if a host is actively editing the effect with some GUI.
Type - int X 1
Property Set - effect instance (read only)
Valid Values - 0 or 1
If false the effect currently has no interface, however this may be because the effect is loaded in a background render host, or it may be loaded on an interactive host that has not yet opened an editor for the effect.
The output of an effect should only ever depend on the state of its parameters, not on the interactive flag. The interactive flag is more a courtesy flag to let a plugin know that it has an interace. If a plugin want’s to have its behaviour dependant on the interactive flag, it can always make a secret parameter which shadows the state if the flag.
-
kOfxPluginPropFilePath
The file path to the plugin.
Type - C string X 1
Property Set - effect descriptor (read only)
This is a string that indicates the file path where the plug-in was found by the host. The path is in the native path format for the host OS (eg: UNIX directory separators are forward slashes, Windows ones are backslashes).
The path is to the bundle location, see InstallationLocation. eg: ‘/usr/OFX/Plugins/AcmePlugins/AcmeFantasticPlugin.ofx.bundle’
-
kOfxPropInstanceData
A private data pointer that the plug-in can store its own data behind.
Type - pointer X 1
Property Set - plugin instance (read/write),
Default - NULL
This data pointer is unique to each plug-in instance, so two instances of the same plug-in do not share the same data pointer. Use it to hang any needed private data structures.
-
kOfxPropType
General property, used to identify the kind of an object behind a handle.
Type - ASCII C string X 1
Property Set - any object handle (read only)
Valid Values - currently this can be…
-
kOfxPropName
Unique name of an object.
Type - ASCII C string X 1
Property Set - on many objects (descriptors and instances), see PropertiesByObject (read only)
This property is used to label objects uniquely amoung objects of that type. It is typically set when a plugin creates a new object with a function that takes a name.
-
kOfxPropVersion
Identifies a specific version of a host or plugin.
Type - int X N
Property Set - host descriptor (read only), plugin descriptor (read/write)
Default - “0”
Valid Values - positive integers
This is a multi dimensional integer property that represents the version of a host (host descriptor), or plugin (plugin descriptor). These represent a version number of the form ‘1.2.3.4’, with each dimension adding another ‘dot’ on the right.
A version is considered to be more recent than another if its ordered set of values is lexicographically greater than another, reading left to right. (ie: 1.2.4 is smaller than 1.2.6). Also, if the number of dimensions is different, then the values of the missing dimensions are considered to be zero (so 1.2.4 is greater than 1.2).
-
kOfxPropVersionLabel
Unique user readable version string of a plugin or host.
Type - string X 1
Property Set - host descriptor (read only), plugin descriptor (read/write)
Default - none, the host needs to set this
Valid Values - ASCII string
This is purely for user feedback, a plugin or host should use kOfxPropVersion if they need to check for specific versions.
-
kOfxPropPluginDescription
Description of the plug-in to a user.
Type - string X 1
Property Set - plugin descriptor (read/write) and instance (read only)
Default - “”
Valid Values - UTF8 string
This is a string giving a potentially verbose description of the effect.
-
kOfxPropLabel
User visible name of an object.
Type - UTF8 C string X 1
Property Set - on many objects (descriptors and instances), see PropertiesByObject. Typically readable and writable in most cases.
Default - the kOfxPropName the object was created with.
The label is what a user sees on any interface in place of the object’s name.
Note that resetting this will also reset kOfxPropShortLabel and kOfxPropLongLabel.
-
kOfxPropIcon
If set this tells the host to use an icon instead of a label for some object in the interface.
Type - string X 2
Property Set - various descriptors in the API
Default - “”
Valid Values - ASCII string
The value is a path is defined relative to the Resource folder that points to an SVG or PNG file containing the icon.
The first dimension, if set, will the name of and SVG file, the second a PNG file.
-
kOfxPropShortLabel
Short user visible name of an object.
Type - UTF8 C string X 1
Property Set - on many objects (descriptors and instances), see PropertiesByObject. Typically readable and writable in most cases.
Default - initially kOfxPropName, but will be reset if kOfxPropLabel is changed.
This is a shorter version of the label, typically 13 character glyphs or less. Hosts should use this if they have limitted display space for their object labels.
-
kOfxPropLongLabel
Long user visible name of an object.
Type - UTF8 C string X 1
Property Set - on many objects (descriptors and instances), see PropertiesByObject. Typically readable and writable in most cases.
Default - initially kOfxPropName, but will be reset if kOfxPropLabel is changed.
This is a longer version of the label, typically 32 character glyphs or so. Hosts should use this if they have mucg display space for their object labels.
-
kOfxPropChangeReason
Indicates why a plug-in changed.
Type - ASCII C string X 1
Property Set - inArgs parameter on the kOfxActionInstanceChanged action.
Valid Values - this can be…
kOfxChangeUserEdited - the user directly edited the instance somehow and caused a change to something, this includes undo/redos and resets
kOfxChangePluginEdited - the plug-in itself has changed the value of the object in some action
kOfxChangeTime - the time has changed and this has affected the value of the object because it varies over time
Argument property for the kOfxActionInstanceChanged action.
-
kOfxPropEffectInstance
A pointer to an effect instance.
Type - pointer X 1
Property Set - on an interact instance (read only)
This property is used to link an object to the effect. For example if the plug-in supplies an openGL overlay for an image effect, the interact instance will have one of these so that the plug-in can connect back to the effect the GUI links to.
-
kOfxPropHostOSHandle
A pointer to an operating system specific application handle.
Type - pointer X 1
Property Set - host descriptor.
Some plug-in vendor want raw OS specific handles back from the host so they can do interesting things with host OS APIs. Typically this is to control windowing properly on Microsoft Windows. This property returns the appropriate ‘root’ window handle on the current operating system. So on Windows this would be the hWnd of the application main window.
-
kOfxChangeUserEdited
String used as a value to kOfxPropChangeReason to indicate a user has changed something.
-
kOfxChangePluginEdited
String used as a value to kOfxPropChangeReason to indicate the plug-in itself has changed something.
-
kOfxChangeTime
String used as a value to kOfxPropChangeReason to a time varying object has changed due to a time change.
-
kOfxFlagInfiniteMax
Used to flag infinite rects. Set minimums to this to indicate infinite.
This is effectively INT_MAX.
-
kOfxFlagInfiniteMin
Used to flag infinite rects. Set minimums to this to indicate infinite.
This is effectively INT_MIN
-
kOfxBitDepthNone
String used to label unset bitdepths.
-
kOfxBitDepthByte
String used to label unsigned 8 bit integer samples.
-
kOfxBitDepthShort
String used to label unsigned 16 bit integer samples.
-
kOfxBitDepthHalf
String used to label half-float (16 bit floating point) samples.
- Version
Added in Version 1.4. Was in ofxOpenGLRender.h before.
-
kOfxBitDepthFloat
String used to label signed 32 bit floating point samples.
-
kOfxStatOK
Status code indicating all was fine.
-
kOfxStatFailed
Status error code for a failed operation.
-
kOfxStatErrFatal
Status error code for a fatal error.
Only returned in the case where the plug-in or host cannot continue to function and needs to be restarted.
-
kOfxStatErrUnknown
Status error code for an operation on or request for an unknown object.
-
kOfxStatErrMissingHostFeature
Status error code returned by plug-ins when they are missing host functionality, either an API or some optional functionality (eg: custom params).
Plug-Ins returning this should post an appropriate error message stating what they are missing.
-
kOfxStatErrUnsupported
Status error code for an unsupported feature/operation.
-
kOfxStatErrExists
Status error code for an operation attempting to create something that exists.
-
kOfxStatErrFormat
Status error code for an incorrect format.
-
kOfxStatErrMemory
Status error code indicating that something failed due to memory shortage.
-
kOfxStatErrBadHandle
Status error code for an operation on a bad handle.
-
kOfxStatErrBadIndex
Status error code indicating that a given index was invalid or unavailable.
-
kOfxStatErrValue
Status error code indicating that something failed due an illegal value.
-
kOfxStatReplyYes
OfxStatus returned indicating a ‘yes’.
-
kOfxStatReplyNo
OfxStatus returned indicating a ‘no’.
-
kOfxStatReplyDefault
OfxStatus returned indicating that a default action should be performed.
Typedefs
-
typedef struct OfxPropertySetStruct *OfxPropertySetHandle
Blind data structure to manipulate sets of properties through.
-
typedef int OfxStatus
OFX status return type.
-
typedef struct OfxHost OfxHost
Generic host structure passed to OfxPlugin::setHost function.
This structure contains what is needed by a plug-in to bootstrap its connection to the host.
- OfxStatus() OfxPluginEntryPoint (const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs)
Entry point for plug-ins.
action
ASCII c string indicating which action to takeinstance
object to which action should be applied, this will need to be cast to the appropriate blind data type depending on the actioninData
handle that contains action specific propertiesoutData
handle where the plug-in should set various action specific properties
The exact set of actions is determined by the plug-in API that is being implemented, however all plug-ins can perform several actions. For the list of actions consult OFX Actions.
-
typedef struct OfxPlugin OfxPlugin
The structure that defines a plug-in to a host.
This structure is the first element in any plug-in structure using the OFX plug-in architecture. By examining its members a host can determine the API that the plug-in implements, the version of that API, its name and version.
For details see Architecture.
-
typedef double OfxTime
How time is specified within the OFX API.
-
typedef struct OfxRangeI OfxRangeI
Defines one dimensional integer bounds.
-
typedef struct OfxRangeD OfxRangeD
Defines one dimensional double bounds.
-
typedef struct OfxPointI OfxPointI
Defines two dimensional integer point.
-
typedef struct OfxPointD OfxPointD
Defines two dimensional double point.
-
typedef struct OfxRectI OfxRectI
Defines two dimensional integer region.
Regions are x1 <= x < x2
Infinite regions are flagged by setting
x1 = kOfxFlagInfiniteMin
y1 = kOfxFlagInfiniteMin
x2 = kOfxFlagInfiniteMax
y2 = kOfxFlagInfiniteMax
-
typedef struct OfxRectD OfxRectD
Defines two dimensional double region.
Regions are x1 <= x < x2
Infinite regions are flagged by setting
x1 = kOfxFlagInfiniteMin
y1 = kOfxFlagInfiniteMin
x2 = kOfxFlagInfiniteMax
y2 = kOfxFlagInfiniteMax
Functions
-
OfxPlugin *OfxGetPlugin(int nth)
Returns the ‘nth’ plug-in implemented inside a binary.
Returns a pointer to the ‘nth’ plug-in implemented in the binary. A function of this type must be implemented in and exported from each plug-in binary.
-
int OfxGetNumberOfPlugins(void)
Defines the number of plug-ins implemented inside a binary.
A host calls this to determine how many plug-ins there are inside a binary it has loaded. A function of this type must be implemented in and exported from each plug-in binary.
-
OfxStatus OfxSetHost(const OfxHost *host)
First thing host should call.
This host call, added in 2020, is not specified in earlier implementation of the API. Therefore host must check if the plugin implemented it and not assume symbol exists. The order of calls is then: 1) OfxSetHost, 2) OfxGetNumberOfPlugins, 3) OfxGetPlugin The host pointer is only assumed valid until OfxGetPlugin where it might get reset. Plug-in can return kOfxStatFailed to indicate it has nothing to do here, it’s not for this Host and it should be skipped silently.
-
OfxExport
- file ofxDialog.h
- #include “ofxCore.h”#include “ofxProperty.h”
This file contains an optional suite which should be used to popup a native OS dialog from a host parameter changed action.
When a host uses a fullscreen window and is running the OFX plugins in another thread it can lead to a lot of conflicts if that plugin will try to open its own window.
This suite will provide the functionality for a plugin to request running its dialog in the UI thread, and informing the host it will do this so it can take the appropriate actions needed. (Like lowering its priority etc..)
Defines
-
kOfxDialogSuite
The name of the Dialog suite, used to fetch from a host via OfxHost::fetchSuite.
-
kOfxActionDialog
Action called after a dialog has requested a ‘Dialog’ The arguments to the action are:
user_data
Pointer which was provided when the plugin requested the Dialog
Typedefs
-
typedef struct OfxDialogSuiteV1 OfxDialogSuiteV1
-
kOfxDialogSuite
- file ofxDrawSuite.h
- #include “ofxCore.h”#include “ofxPixels.h”
API for host- and GPU API-independent drawing.
- Version
Added in OpenFX 1.5
Defines
-
kOfxDrawSuite
the string that names the DrawSuite, passed to OfxHost::fetchSuite
-
kOfxInteractPropDrawContext
The Draw Context handle.
Type - pointer X 1
Property Set - read only property on the inArgs of the following actions…
Typedefs
-
typedef struct OfxDrawContext *OfxDrawContextHandle
Blind declaration of an OFX drawing context.
-
typedef enum OfxStandardColour OfxStandardColour
Defines valid values for OfxDrawSuiteV1::getColour.
-
typedef enum OfxDrawLineStipplePattern OfxDrawLineStipplePattern
Defines valid values for OfxDrawSuiteV1::setLineStipple.
-
typedef enum OfxDrawPrimitive OfxDrawPrimitive
Defines valid values for OfxDrawSuiteV1::draw.
-
typedef enum OfxDrawTextAlignment OfxDrawTextAlignment
Defines text alignment values for OfxDrawSuiteV1::drawText.
-
typedef struct OfxDrawSuiteV1 OfxDrawSuiteV1
OFX suite that allows an effect to draw to a host-defined display context.
Enums
-
enum OfxStandardColour
Defines valid values for OfxDrawSuiteV1::getColour.
Values:
-
enumerator kOfxStandardColourOverlayBackground
-
enumerator kOfxStandardColourOverlayActive
-
enumerator kOfxStandardColourOverlaySelected
-
enumerator kOfxStandardColourOverlayDeselected
-
enumerator kOfxStandardColourOverlayMarqueeFG
-
enumerator kOfxStandardColourOverlayMarqueeBG
-
enumerator kOfxStandardColourOverlayText
-
enumerator kOfxStandardColourOverlayBackground
-
enum OfxDrawLineStipplePattern
Defines valid values for OfxDrawSuiteV1::setLineStipple.
Values:
-
enumerator kOfxDrawLineStipplePatternSolid
-
enumerator kOfxDrawLineStipplePatternDot
-
enumerator kOfxDrawLineStipplePatternDash
-
enumerator kOfxDrawLineStipplePatternAltDash
-
enumerator kOfxDrawLineStipplePatternDotDash
-
enumerator kOfxDrawLineStipplePatternSolid
-
enum OfxDrawPrimitive
Defines valid values for OfxDrawSuiteV1::draw.
Values:
-
enumerator kOfxDrawPrimitiveLines
-
enumerator kOfxDrawPrimitiveLineStrip
-
enumerator kOfxDrawPrimitiveLineLoop
-
enumerator kOfxDrawPrimitiveRectangle
-
enumerator kOfxDrawPrimitivePolygon
-
enumerator kOfxDrawPrimitiveEllipse
-
enumerator kOfxDrawPrimitiveLines
-
enum OfxDrawTextAlignment
Defines text alignment values for OfxDrawSuiteV1::drawText.
Values:
-
enumerator kOfxDrawTextAlignmentLeft
-
enumerator kOfxDrawTextAlignmentRight
-
enumerator kOfxDrawTextAlignmentTop
-
enumerator kOfxDrawTextAlignmentBottom
-
enumerator kOfxDrawTextAlignmentBaseline
-
enumerator kOfxDrawTextAlignmentCenterH
-
enumerator kOfxDrawTextAlignmentCenterV
-
enumerator kOfxDrawTextAlignmentLeft
- file ofxGPURender.h
- #include “ofxImageEffect.h”
This file contains an optional suite for performing GPU-accelerated rendering of OpenFX Image Effect Plug-ins. For details see \ref ofxGPURender. It allows hosts and plug-ins to support OpenGL, OpenCL, CUDA, and Metal. Additional GPU APIs, such a Vulkan, could use similar techniques.
StatusReturnValues
OfxStatus returns indicating that a OpenGL render error has occurred:
If a plug-in returns kOfxStatGLRenderFailed, the host should retry the render with OpenGL rendering disabled.
If a plug-in returns kOfxStatGLOutOfMemory, the host may choose to free resources on the GPU and retry the OpenGL render, rather than immediately falling back to CPU rendering.
-
kOfxStatGPUOutOfMemory
GPU render ran out of memory.
-
kOfxStatGLOutOfMemory
OpenGL render ran out of memory (same as
kOfxStatGPUOutOfMemory
)
-
kOfxStatGPURenderFailed
GPU render failed in a non-memory-related way.
-
kOfxStatGLRenderFailed
OpenGL render failed in a non-memory-related way (same as
kOfxStatGPURenderFailed
)
Defines
-
__OFXGPURENDER_H__
-
kOfxOpenGLRenderSuite
The name of the OpenGL render suite, used to fetch from a host via OfxHost::fetchSuite.
-
kOfxImageEffectPropOpenGLRenderSupported
Indicates whether a host or plug-in can support OpenGL accelerated rendering.
Type - C string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only) - plug-in instance change (read/write)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - in which case the host or plug-in does not support OpenGL accelerated rendering
”true” - which means a host or plug-in can support OpenGL accelerated rendering, in the case of plug-ins this also means that it is capable of CPU based rendering in the absence of a GPU
”needed” - only for plug-ins, this means that an plug-in has to have OpenGL support, without which it cannot work.
V1.4: It is now expected from host reporting v1.4 that the plug-in can during instance change switch from true to false and false to true.
-
kOfxOpenGLPropPixelDepth
Indicates the bit depths supported by a plug-in during OpenGL renders.
This is analogous to kOfxImageEffectPropSupportedPixelDepths. When a plug-in sets this property, the host will try to provide buffers/textures in one of the supported formats. Additionally, the target buffers where the plug-in renders to will be set to one of the supported formats.
Unlike kOfxImageEffectPropSupportedPixelDepths, this property is optional. Shader-based effects might not really care about any format specifics when using OpenGL textures, so they can leave this unset and allow the host the decide the format.
Type - string X N
Property Set - plug-in descriptor (read only)
Default - none set
Valid Values - This must be one of
kOfxBitDepthNone (implying a clip is unconnected, not valid for an image)
-
kOfxImageEffectPropOpenGLEnabled
Indicates that a plug-in SHOULD use OpenGL acceleration in the current action.
When a plug-in and host have established they can both use OpenGL renders then when this property has been set the host expects the plug-in to render its result into the buffer it has setup before calling the render. The plug-in can then also safely use the ‘OfxImageEffectOpenGLRenderSuite’
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that the plug-in cannot use the OpenGL suite
1 indicates that the plug-in should render into the texture, and may use the OpenGL suite functions.
v1.4: kOfxImageEffectPropOpenGLEnabled should probably be checked in Instance Changed prior to try to read image via clipLoadTexture
Note
Once this property is set, the host and plug-in have agreed to use OpenGL, so the effect SHOULD access all its images through the OpenGL suite.
-
kOfxImageEffectPropOpenGLTextureIndex
Indicates the texture index of an image turned into an OpenGL texture by the host.
Type - int X 1
Property Set - texture handle returned by ` OfxImageEffectOpenGLRenderSuiteV1::clipLoadTexture (read only)
The property set of the following actions should contain this property:This value should be cast to a GLuint and used as the texture index when performing OpenGL texture operations.
-
kOfxImageEffectPropOpenGLTextureTarget
Indicates the texture target enumerator of an image turned into an OpenGL texture by the host.
Type - int X 1
Property Set - texture handle returned by OfxImageEffectOpenGLRenderSuiteV1::clipLoadTexture (read only) This value should be cast to a GLenum and used as the texture target when performing OpenGL texture operations.
The property set of the following actions should contain this property:
-
kOfxActionOpenGLContextAttached
Action called when an effect has just been attached to an OpenGL context.
The purpose of this action is to allow a plug-in to set up any data it may need to do OpenGL rendering in an instance. For example…
allocate a lookup table on a GPU,
create an OpenCL or CUDA context that is bound to the host’s OpenGL context so it can share buffers.
The plug-in will be responsible for deallocating any such shared resource in the kOfxActionOpenGLContextDetached action.
A host cannot call kOfxActionOpenGLContextAttached on the same instance without an intervening kOfxActionOpenGLContextDetached. A host can have a plug-in swap OpenGL contexts by issuing a attach/detach for the first context then another attach for the next context.
The arguments to the action are…
handle
handle to the plug-in instance, cast to an OfxImageEffectHandleinArgs
is redundant and set to NULLoutArgs
is redundant and set to NULL
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored, but all was well anyway
kOfxStatErrMemory, in which case this may be called again after a memory purge
kOfxStatFailed, something went wrong, but no error code appropriate, the plug-in should to post a message if possible and the host should not attempt to run the plug-in in OpenGL render mode.
-
kOfxActionOpenGLContextDetached
Action called when an effect is about to be detached from an OpenGL context.
The purpose of this action is to allow a plug-in to deallocate any resource allocated in kOfxActionOpenGLContextAttached just before the host decouples a plug-in from an OpenGL context. The host must call this with the same OpenGL context active as it called with the corresponding kOfxActionOpenGLContextAttached.
The arguments to the action are…
handle
handle to the plug-in instance, cast to an OfxImageEffectHandleinArgs
is redundant and set to NULLoutArgs
is redundant and set to NULL
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored, but all was well anyway
kOfxStatErrMemory, in which case this may be called again after a memory purge
kOfxStatFailed, something went wrong, but no error code appropriate, the plug-in should to post a message if possible and the host should not attempt to run the plug-in in OpenGL render mode.
-
kOfxImageEffectPropCudaRenderSupported
Indicates whether a host or plug-in can support CUDA render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - the host or plug-in does not support CUDA render
”true” - the host or plug-in can support CUDA render
-
kOfxImageEffectPropCudaEnabled
Indicates that a plug-in SHOULD use CUDA render in the current action.
If a plug-in and host have both set kOfxImageEffectPropCudaRenderSupported=”true” then the host MAY set this property to indicate that it is passing images as CUDA memory pointers.
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that the kOfxImagePropData of each image of each clip is a CPU memory pointer.
1 indicates that the kOfxImagePropData of each image of each clip is a CUDA memory pointer.
-
kOfxImageEffectPropCudaStreamSupported
Indicates whether a host or plug-in can support CUDA streams.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - in which case the host or plug-in does not support CUDA streams
”true” - which means a host or plug-in can support CUDA streams
-
kOfxImageEffectPropCudaStream
The CUDA stream to be used for rendering.
Type - pointer X 1
Property Set - inArgs property set of the following actions…
This property will only be set if the host and plug-in both support CUDA streams.
If set:
this property contains a pointer to the stream of CUDA render (cudaStream_t). In order to use it, reinterpret_cast<cudaStream_t>(pointer) is needed.
the plug-in SHOULD ensure that its render action enqueues any asynchronous CUDA operations onto the supplied queue.
the plug-in SHOULD NOT wait for final asynchronous operations to complete before returning from the render action, and SHOULD NOT call cudaDeviceSynchronize() at any time.
If not set:
the plug-in SHOULD ensure that any asynchronous operations it enqueues have completed before returning from the render action.
-
kOfxImageEffectPropMetalRenderSupported
Indicates whether a host or plug-in can support Metal render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - the host or plug-in does not support Metal render
”true” - the host or plug-in can support Metal render
-
kOfxImageEffectPropMetalEnabled
Indicates that a plug-in SHOULD use Metal render in the current action.
If a plug-in and host have both set kOfxImageEffectPropMetalRenderSupported=”true” then the host MAY set this property to indicate that it is passing images as Metal buffers.
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that the kOfxImagePropData of each image of each clip is a CPU memory pointer.
1 indicates that the kOfxImagePropData of each image of each clip is a Metal id<MTLBuffer>.
-
kOfxImageEffectPropMetalCommandQueue
The command queue of Metal render.
Type - pointer X 1
Property Set - inArgs property set of the following actions…
This property contains a pointer to the command queue to be used for Metal rendering (id<MTLCommandQueue>). In order to use it, reinterpret_cast<id<MTLCommandQueue>>(pointer) is needed.
The plug-in SHOULD ensure that its render action enqueues any asynchronous Metal operations onto the supplied queue.
The plug-in SHOULD NOT wait for final asynchronous operations to complete before returning from the render action.
-
kOfxImageEffectPropOpenCLRenderSupported
Indicates whether a host or plug-in can support OpenCL Buffers render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - the host or plug-in does not support OpenCL Buffers render
”true” - the host or plug-in can support OpenCL Buffers render
-
kOfxImageEffectPropOpenCLSupported
Indicates whether a host or plug-in can support OpenCL Images render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - in which case the host or plug-in does not support OpenCL Images render
”true” - which means a host or plug-in can support OpenCL Images render
-
kOfxImageEffectPropOpenCLEnabled
Indicates that a plug-in SHOULD use OpenCL render in the current action.
If a plug-in and host have both set kOfxImageEffectPropOpenCLRenderSupported=”true” or have both set kOfxImageEffectPropOpenCLSupported=”true” then the host MAY set this property to indicate that it is passing images as OpenCL Buffers or Images.
When rendering using OpenCL Buffers, the cl_mem of the buffers are retrieved using kOfxImagePropData. When rendering using OpenCL Images, the cl_mem of the images are retrieved using kOfxImageEffectPropOpenCLImage. If both kOfxImageEffectPropOpenCLSupported (Buffers) and kOfxImageEffectPropOpenCLRenderSupported (Images) are enabled by the plug-in, it should use kOfxImageEffectPropOpenCLImage to determine which is being used by the host.
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that a plug-in SHOULD use OpenCL render in the render action
1 indicates that a plug-in SHOULD NOT use OpenCL render in the render action
-
kOfxImageEffectPropOpenCLCommandQueue
Indicates the OpenCL command queue that should be used for rendering.
Type - pointer X 1
Property Set - inArgs property set of the following actions…
This property contains a pointer to the command queue to be used for OpenCL rendering (cl_command_queue). In order to use it, reinterpret_cast<cl_command_queue>(pointer) is needed.
The plug-in SHOULD ensure that its render action enqueues any asynchronous OpenCL operations onto the supplied queue.
The plug-in SHOULD NOT wait for final asynchronous operations to complete before returning from the render action.
-
kOfxImageEffectPropOpenCLImage
Indicates the image handle of an image supplied as an OpenCL Image by the host.
Type - pointer X 1
Property Set - image handle returned by clipGetImage
This value should be cast to a cl_mem and used as the image handle when performing OpenCL Images operations. The property should be used (not kOfxImagePropData) when rendering with OpenCL Images (kOfxImageEffectPropOpenCLSupported), and should be used to determine whether Images or Buffers should be used if a plug-in supports both kOfxImageEffectPropOpenCLSupported and kOfxImageEffectPropOpenCLRenderSupported. Note: the kOfxImagePropRowBytes property is not required to be set by the host, since OpenCL Images do not have the concept of row bytes.
-
kOfxOpenCLProgramSuite
Typedefs
-
typedef struct OfxImageEffectOpenGLRenderSuiteV1 OfxImageEffectOpenGLRenderSuiteV1
OFX suite that provides image to texture conversion for OpenGL processing.
-
typedef struct OfxOpenCLProgramSuiteV1 OfxOpenCLProgramSuiteV1
OFX suite that allows a plug-in to get OpenCL programs compiled.
This is an optional suite the host can provide for building OpenCL programs for the plug-in, as an alternative to calling clCreateProgramWithSource / clBuildProgram. There are two advantages to doing this: The host can add flags (such as -cl-denorms-are-zero) to the build call, and may also cache program binaries for performance (however, if the source of the program or the OpenCL environment changes, the host must recompile so some mechanism such as hashing must be used).
- file ofxImageEffect.h
- #include “ofxCore.h”#include “ofxParam.h”#include “ofxInteract.h”#include “ofxMessage.h”#include “ofxMemory.h”#include “ofxMultiThread.h”
Defines
-
_ofxImageEffect_h_
-
kOfxImageEffectPluginApi
String used to label OFX Image Effect Plug-ins.
Set the pluginApi member of the OfxPluginHeader inside any OfxImageEffectPluginStruct to be this so that the host knows the plugin is an image effect.
-
kOfxImageEffectPluginApiVersion
The current version of the Image Effect API.
-
kOfxImageComponentNone
String to label something with unset components.
-
kOfxImageComponentRGBA
String to label images with RGBA components.
-
kOfxImageComponentRGB
String to label images with RGB components.
-
kOfxImageComponentAlpha
String to label images with only Alpha components.
-
kOfxImageEffectContextGenerator
Use to define the generator image effect context. See kOfxImageEffectPropContext.
-
kOfxImageEffectContextFilter
Use to define the filter effect image effect context See kOfxImageEffectPropContext.
-
kOfxImageEffectContextTransition
Use to define the transition image effect context See kOfxImageEffectPropContext.
-
kOfxImageEffectContextPaint
Use to define the paint image effect context See kOfxImageEffectPropContext.
-
kOfxImageEffectContextGeneral
Use to define the general image effect context See kOfxImageEffectPropContext.
-
kOfxImageEffectContextRetimer
Use to define the retimer effect context See kOfxImageEffectPropContext.
-
kOfxTypeImageEffectHost
Used as a value for kOfxPropType on image effect host handles.
-
kOfxTypeImageEffect
Used as a value for kOfxPropType on image effect plugin handles.
-
kOfxTypeImageEffectInstance
Used as a value for kOfxPropType on image effect instance handles
-
kOfxTypeClip
Used as a value for kOfxPropType on image effect clips.
-
kOfxTypeImage
Used as a value for kOfxPropType on image effect images.
-
kOfxImageEffectActionGetRegionOfDefinition
The region of definition for an image effect is the rectangular section of the 2D image plane that it is capable of filling, given the state of its input clips and parameters. This action is used to calculate the RoD for a plugin instance at a given frame. For more details on regions of definition see Image Effect Architectures.
Note that hosts that have constant sized imagery need not call this action, only hosts that allow image sizes to vary need call this.
If the effect did not trap this, it means the host should use the default RoD instead, which depends on the context. This is…
generator context - defaults to the project window,
filter and paint contexts - defaults to the RoD of the ‘Source’ input clip at the given time,
transition context - defaults to the union of the RoDs of the ‘SourceFrom’ and ‘SourceTo’ input clips at the given time,
general context - defaults to the union of the RoDs of all the non optional input clips and the ‘Source’ input clip (if it exists and it is connected) at the given time, if none exist, then it is the project window
retimer context - defaults to the union of the RoD of the ‘Source’ input clip at the frame directly preceding the value of the ‘SourceTime’ double parameter and the frame directly after it
- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – has the following properties
kOfxPropTime the effect time for which a region of definition is being requested
kOfxImageEffectPropRenderScale the render scale that should be used in any calculations in this action
outArgs – has the following property which the plug-in may set
kOfxImageEffectPropRegionOfDefinition the calculated region of definition, initially set by the host to the default RoD (see below), in Canonical Coordinates.
- Returns:
kOfxStatOK the action was trapped and the RoD was set in the outArgs property set
kOfxStatReplyDefault, the action was not trapped and the host should use the default values
kOfxStatErrMemory, in which case the action may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxImageEffectActionGetRegionsOfInterest
This action allows a host to ask an effect, given a region I want to render, what region do you need from each of your input clips. In that way, depending on the host architecture, a host can fetch the minimal amount of the image needed as input. Note that there is a region of interest to be set in
outArgs
for each input clip that exists on the effect. For more details see Image EffectArchitectures”.The default RoI is simply the value passed in on the kOfxImageEffectPropRegionOfInterest
inArgs
property set. All the RoIs in theoutArgs
property set must initialised to this value before the action is called.- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – has the following properties
kOfxPropTime the effect time for which a region of definition is being requested
kOfxImageEffectPropRenderScale the render scale that should be used in any calculations in this action
kOfxImageEffectPropRegionOfInterest the region to be rendered in the output image, in Canonical Coordinates.
outArgs – has a set of 4 dimensional double properties, one for each of the input clips to the effect. The properties are each named
OfxImageClipPropRoI_
with the clip name post pended, for exampleOfxImageClipPropRoI_Source
. These are initialised to the default RoI.
- Returns:
kOfxStatOK, the action was trapped and at least one RoI was set in the outArgs property set
kOfxStatReplyDefault, the action was not trapped and the host should use the default values
kOfxStatErrMemory, in which case the action may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxImageEffectActionGetTimeDomain
This action allows a host to ask an effect what range of frames it can produce images over. Only effects instantiated in the GeneralContext” can have this called on them. In all other the host is in strict control over the temporal duration of the effect.
The default is:
the union of all the frame ranges of the non optional input clips,
infinite if there are no non optional input clips.
- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – is redundant and is null
outArgs – has the following property
kOfxImageEffectPropFrameRange the frame range an effect can produce images for
- Pre:
kOfxActionCreateInstance has been called on the instance
the effect instance has been created in the general effect context
- Returns:
kOfxStatOK, the action was trapped and the kOfxImageEffectPropFrameRange was set in the outArgs property set
kOfxStatReplyDefault, the action was not trapped and the host should use the default value
kOfxStatErrMemory, in which case the action may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxImageEffectActionGetFramesNeeded
This action lets the host ask the effect what frames are needed from each input clip to process a given frame. For example a temporal based degrainer may need several frames around the frame to render to do its work.
This action need only ever be called if the plugin has set the kOfxImageEffectPropTemporalClipAccess property on the plugin descriptor to be true. Otherwise the host assumes that the only frame needed from the inputs is the current one and this action is not called.
Note that each clip can have it’s required frame range specified, and that you can specify discontinuous sets of ranges for each clip, for example
// The effect always needs the initial frame of the source as well as the previous and current frame double rangeSource[4]; // required ranges on the source rangeSource[0] = 0; // we always need frame 0 of the source rangeSource[1] = 0; rangeSource[2] = currentFrame - 1; // we also need the previous and current frame on the source rangeSource[3] = currentFrame; gPropHost->propSetDoubleN(outArgs, "OfxImageClipPropFrameRange_Source", 4, rangeSource);
Which sets two discontinuous range of frames from the 'Source' clip required as input.
The default frame range is simply the single frame, kOfxPropTime..kOfxPropTime, found on the
inArgs
property set. All the frame ranges in theoutArgs
property set must initialised to this value before the action is called.- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – has the following property
kOfxPropTime the effect time for which we need to calculate the frames needed on input
outArgs has a set of properties, one for each input clip, named
OfxImageClipPropFrameRange_
with the name of the clip post-pended. For exampleOfxImageClipPropFrameRange_Source
. All these properties are multi-dimensional doubles, with the dimension is a multiple of two. Each pair of values indicates a continuous range of frames that is needed on the given input. They are all initalised to the default value.
- Returns:
kOfxStatOK, the action was trapped and at least one frame range in the outArgs property set
kOfxStatReplyDefault, the action was not trapped and the host should use the default values
kOfxStatErrMemory, in which case the action may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxImageEffectActionGetClipPreferences
This action allows a plugin to dynamically specify its preferences for input and output clips. Please see Image Effect Clip Preferences for more details on the behaviour. Clip preferences are constant for the duration of an effect, so this action need only be called once per clip, not once per frame.
This should be called once after creation of an instance, each time an input clip is changed, and whenever a parameter named in the kOfxImageEffectPropClipPreferencesSlaveParam has its value changed.
- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – is redundant and is set to NULL
outArgs – has the following properties which the plugin can set
a set of char * X 1 properties, one for each of the input clips currently attached and the output clip, labelled with
OfxImageClipPropComponents_
post pended with the clip’s name. This must be set to one of the component types which the host supports and the effect stated it can accept on that inputa set of char * X 1 properties, one for each of the input clips currently attached and the output clip, labelled with
OfxImageClipPropDepth_
post pended with the clip’s name. This must be set to one of the pixel depths both the host and plugin supportsa set of double X 1 properties, one for each of the input clips currently attached and the output clip, labelled with
OfxImageClipPropPAR_
post pended with the clip’s name. This is the pixel aspect ratio of the input and output clips. This must be set to a positive non zero double value,kOfxImageEffectPropFrameRate the frame rate of the output clip, this must be set to a positive non zero double value
kOfxImageClipPropFieldOrder the fielding of the output clip
kOfxImageEffectPropPreMultiplication the premultiplication of the output clip
kOfxImageClipPropContinuousSamples whether the output clip can produce different images at non-frame intervals, defaults to false,
kOfxImageEffectFrameVarying whether the output clip can produces different images at different times, even if all parameters and inputs are constant, defaults to false.
- Returns:
kOfxStatOK, the action was trapped and at least one of the properties in the outArgs was changed from its default value
kOfxStatReplyDefault, the action was not trapped and the host should use the default values
kOfxStatErrMemory, in which case the action may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxImageEffectActionIsIdentity
Sometimes an effect can pass through an input uprocessed, for example a blur effect with a blur size of 0. This action can be called by a host before it attempts to render an effect to determine if it can simply copy input directly to output without having to call the render action on the effect.
If the effect does not need to process any pixels, it should set the value of the kOfxPropName to the clip that the host should us as the output instead, and the kOfxPropTime property on
outArgs
to be the time at which the frame should be fetched from a clip.The default action is to call the render action on the effect.
- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – has the following properties
kOfxPropTime the time at which to test for identity
kOfxImageEffectPropFieldToRender the field to test for identity
kOfxImageEffectPropRenderWindow the window (in \ref PixelCoordinates) to test for identity under
kOfxImageEffectPropRenderScale the scale factor being applied to the images being renderred
outArgs – has the following properties which the plugin can set
kOfxPropName this to the name of the clip that should be used if the effect is an identity transform, defaults to the empty string
kOfxPropTime the time to use from the indicated source clip as an identity image (allowing time slips to happen), defaults to the value in kOfxPropTime in inArgs
- Returns:
kOfxStatOK, the action was trapped and the effect should not have its render action called, the values in outArgs indicate what frame from which clip to use instead
kOfxStatReplyDefault, the action was not trapped and the host should call the render action
kOfxStatErrMemory, in which case the action may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxImageEffectActionRender
This action is where an effect gets to push pixels and turn its input clips and parameter set into an output image. This is possibly quite complicated and covered in the Rendering Image Effects chapter.
The render action must be trapped by the plug-in, it cannot return kOfxStatReplyDefault. The pixels needs be pushed I’m afraid.
- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – has the following properties
kOfxPropTime the time at which to render
kOfxImageEffectPropFieldToRender the field to render
kOfxImageEffectPropRenderWindow the window (in \ref PixelCoordinates) to render
kOfxImageEffectPropRenderScale the scale factor being applied to the images being renderred
kOfxImageEffectPropSequentialRenderStatus whether the effect is currently being rendered in strict frame order on a single instance
kOfxImageEffectPropInteractiveRenderStatus if the render is in response to a user modifying the effect in an interactive session
kOfxImageEffectPropRenderQualityDraft if the render should be done in draft mode (e.g. for faster scrubbing)
outArgs – is redundant and should be set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance
kOfxImageEffectActionBeginSequenceRender has been called on the instance
- Post:
kOfxImageEffectActionEndSequenceRender action will be called on the instance
- Returns:
kOfxStatOK, the effect rendered happily
kOfxStatErrMemory, in which case the action may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxImageEffectActionBeginSequenceRender
This action is passed to an image effect before it renders a range of frames. It is there to allow an effect to set things up for a long sequence of frames. Note that this is still called, even if only a single frame is being rendered in an interactive environment.
- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – has the following properties
kOfxImageEffectPropFrameRange the range of frames (inclusive) that will be renderred
kOfxImageEffectPropFrameStep what is the step between frames, generally set to 1 (for full frame renders) or 0.5 (for fielded renders)
kOfxPropIsInteractive is this a single frame render due to user interaction in a GUI, or a proper full sequence render.
kOfxImageEffectPropRenderScale the scale factor to apply to images for this call
kOfxImageEffectPropSequentialRenderStatus whether the effect is currently being rendered in strict frame order on a single instance
kOfxImageEffectPropInteractiveRenderStatus if the render is in response to a user modifying the effect in an interactive session
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance
- Post:
kOfxImageEffectActionRender action will be called at least once on the instance
kOfxImageEffectActionEndSequenceRender action will be called on the instance
- Returns:
kOfxStatOK, the action was trapped and handled cleanly by the effect,
kOfxStatReplyDefault, the action was not trapped, but all is well anyway,
kOfxStatErrMemory, in which case the action may be called again after a memory purge,
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message,
-
kOfxImageEffectActionEndSequenceRender
This action is passed to an image effect after is has rendered a range of frames. It is there to allow an effect to free resources after a long sequence of frame renders. Note that this is still called, even if only a single frame is being rendered in an interactive environment.
- Parameters:
handle – handle to the instance, cast to an OfxImageEffectHandle
inArgs – has the following properties
kOfxImageEffectPropFrameRange the range of frames (inclusive) that will be rendered
kOfxImageEffectPropFrameStep what is the step between frames, generally set to 1 (for full frame renders) or 0.5 (for fielded renders),
is this a single frame render due to user interaction in a GUI, or a proper full sequence render.
the scale factor to apply to images for this call
whether the effect is currently being rendered in strict frame order on a single instance
if the render is in response to a user modifying the effect in an interactive session
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance
kOfxImageEffectActionEndSequenceRender action was called on the instance
kOfxImageEffectActionRender action was called at least once on the instance
- Returns:
kOfxStatOK, the action was trapped and handled cleanly by the effect,
kOfxStatReplyDefault, the action was not trapped, but all is well anyway,
kOfxStatErrMemory, in which case the action may be called again after a memory purge,
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message,
-
kOfxImageEffectActionDescribeInContext
This action is unique to OFX Image Effect plug-ins. Because a plugin is able to exhibit different behaviour depending on the context of use, each separate context will need to be described individually. It is within this action that image effects describe which parameters and input clips it requires.
This action will be called multiple times, one for each of the contexts the plugin says it is capable of implementing. If a host does not support a certain context, then it need not call kOfxImageEffectActionDescribeInContext for that context.
This action must be trapped, it is not optional.
- Parameters:
handle – handle to the context descriptor, cast to an OfxImageEffectHandle this may or may not be the same as passed to kOfxActionDescribe
inArgs – has the following property:
kOfxImageEffectPropContext the context being described
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionDescribe has been called on the descriptor handle,
kOfxActionCreateInstance has not been called
- Returns:
kOfxStatOK, the action was trapped and all was well
kOfxStatErrMissingHostFeature, in which the context will be ignored by the host, the plugin may post a message
kOfxStatErrMemory, in which case the action may be called again after a memory purge
kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
-
kOfxImageEffectPropSupportedContexts
Indicates to the host the contexts a plugin can be used in.
Type - string X N
Property Set - image effect descriptor passed to kOfxActionDescribe (read/write)
Default - this has no defaults, it must be set
Valid Values - This must be one of
-
kOfxImageEffectPropPluginHandle
The plugin handle passed to the initial ‘describe’ action.
Type - pointer X 1
Property Set - plugin instance, (read only)
This value will be the same for all instances of a plugin.
-
kOfxImageEffectHostPropIsBackground
Indicates if a host is a background render.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - This must be one of
0 if the host is a foreground host, it may open the effect in an interactive session (or not)
1 if the host is a background ‘processing only’ host, and the effect will never be opened in an interactive session.
-
kOfxImageEffectPluginPropSingleInstance
Indicates whether only one instance of a plugin can exist at the same time.
Type - int X 1
Property Set - plugin descriptor (read/write)
Default - 0
Valid Values - This must be one of
0 - which means multiple instances can exist simultaneously,
1 - which means only one instance can exist at any one time.
Some plugins, for whatever reason, may only be able to have a single instance in existance at any one time. This plugin property is used to indicate that.
-
kOfxImageEffectPluginRenderThreadSafety
Indicates how many simultaneous renders the plugin can deal with.
Type - string X 1
Property Set - plugin descriptor (read/write)
Default - kOfxImageEffectRenderInstanceSafe
Valid Values - This must be one of
kOfxImageEffectRenderUnsafe - indicating that only a single ‘render’ call can be made at any time amoung all instances,
kOfxImageEffectRenderInstanceSafe - indicating that any instance can have a single ‘render’ call at any one time,
kOfxImageEffectRenderFullySafe - indicating that any instance of a plugin can have multiple renders running simultaneously
-
kOfxImageEffectRenderUnsafe
String used to label render threads as un thread safe, see, kOfxImageEffectPluginRenderThreadSafety.
-
kOfxImageEffectRenderInstanceSafe
String used to label render threads as instance thread safe, kOfxImageEffectPluginRenderThreadSafety.
-
kOfxImageEffectRenderFullySafe
String used to label render threads as fully thread safe, kOfxImageEffectPluginRenderThreadSafety.
-
kOfxImageEffectPluginPropHostFrameThreading
Indicates whether a plugin lets the host perform per frame SMP threading.
Type - int X 1
Property Set - plugin descriptor (read/write)
Default - 1
Valid Values - This must be one of
0 - which means that the plugin will perform any per frame SMP threading
1 - which means the host can call an instance’s render function simultaneously at the same frame, but with different windows to render.
-
kOfxImageEffectPropSupportsMultipleClipDepths
Indicates whether a host or plugin can support clips of differing component depths going into/out of an effect.
Type - int X 1
Property Set - plugin descriptor (read/write), host descriptor (read only)
Default - 0 for a plugin
Valid Values - This must be one of
0 - in which case the host or plugin does not support clips of multiple pixel depths,
1 - which means a host or plugin is able to to deal with clips of multiple pixel depths,
If a host indicates that it can support multiple pixels depths, then it will allow the plugin to explicitly set the output clip’s pixel depth in the kOfxImageEffectActionGetClipPreferences action. See ImageEffectClipPreferences.
-
kOfxImageEffectPropSupportsMultipleClipPARs
Indicates whether a host or plugin can support clips of differing pixel aspect ratios going into/out of an effect.
Type - int X 1
Property Set - plugin descriptor (read/write), host descriptor (read only)
Default - 0 for a plugin
Valid Values - This must be one of
0 - in which case the host or plugin does not support clips of multiple pixel aspect ratios
1 - which means a host or plugin is able to to deal with clips of multiple pixel aspect ratios
If a host indicates that it can support multiple pixel aspect ratios, then it will allow the plugin to explicitly set the output clip’s aspect ratio in the kOfxImageEffectActionGetClipPreferences action. See ImageEffectClipPreferences.
-
kOfxImageEffectPropClipPreferencesSlaveParam
Indicates the set of parameters on which a value change will trigger a change to clip preferences.
Type - string X N
Property Set - plugin descriptor (read/write)
Default - none set
Valid Values - the name of any described parameter
The plugin uses this to inform the host of the subset of parameters that affect the effect’s clip preferences. A value change in any one of these will trigger a call to the clip preferences action.
The plugin can be slaved to multiple parameters (setting index 0, then index 1 etc…)
-
kOfxImageEffectPropSetableFrameRate
Indicates whether the host will let a plugin set the frame rate of the output clip.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - This must be one of
0 - in which case the plugin may not change the frame rate of the output clip,
1 - which means a plugin is able to change the output clip’s frame rate in the kOfxImageEffectActionGetClipPreferences action.
See ImageEffectClipPreferences.
If a clip can be continously sampled, the frame rate will be set to 0.
-
kOfxImageEffectPropSetableFielding
Indicates whether the host will let a plugin set the fielding of the output clip.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - This must be one of
0 - in which case the plugin may not change the fielding of the output clip,
1 - which means a plugin is able to change the output clip’s fielding in the kOfxImageEffectActionGetClipPreferences action.
See ImageEffectClipPreferences.
-
kOfxImageEffectInstancePropSequentialRender
Indicates whether a plugin needs sequential rendering, and a host support it.
Type - int X 1
Property Set - plugin descriptor (read/write) or plugin instance (read/write), and host descriptor (read only)
Default - 0
Valid Values -
0 - for a plugin, indicates that a plugin does not need to be sequentially rendered to be correct, for a host, indicates that it cannot ever guarantee sequential rendering,
1 - for a plugin, indicates that it needs to be sequentially rendered to be correct, for a host, indicates that it can always support sequential rendering of plugins that are sequentially rendered,
2 - for a plugin, indicates that it is best to render sequentially, but will still produce correct results if not, for a host, indicates that it can sometimes render sequentially, and will have set kOfxImageEffectPropSequentialRenderStatus on the relevant actions
Some effects have temporal dependancies, some information from from the rendering of frame N-1 is needed to render frame N correctly. This property is set by an effect to indicate such a situation. Also, some effects are more efficient if they run sequentially, but can still render correct images even if they do not, eg: a complex particle system.
During an interactive session a host may attempt to render a frame out of sequence (for example when the user scrubs the current time), and the effect needs to deal with such a situation as best it can to provide feedback to the user.
However if a host caches output, any frame frame generated in random temporal order needs to be considered invalid and needs to be re-rendered when the host finally performs a first to last render of the output sequence.
In all cases, a host will set the kOfxImageEffectPropSequentialRenderStatus flag to indicate its sequential render status.
-
kOfxImageEffectPropSequentialRenderStatus
Property on all the render action that indicate the current sequential render status of a host.
Type - int X 1
Property Set - read only property on the inArgs of the following actions…
Valid Values -
0 - the host is not currently sequentially rendering,
1 - the host is currentely rendering in a way so that it guarantees sequential rendering.
This property is set to indicate whether the effect is currently being rendered in frame order on a single effect instance. See kOfxImageEffectInstancePropSequentialRender for more details on sequential rendering.
-
kOfxHostNativeOriginBottomLeft
-
kOfxHostNativeOriginTopLeft
-
kOfxHostNativeOriginCenter
-
kOfxImageEffectHostPropNativeOrigin
Property that indicates the host native UI space - this is only a UI hint, has no impact on pixel processing.
Type - UTF8 string X 1
Property Set - read only property (host)
Valid Values - “kOfxImageEffectHostPropNativeOriginBottomLeft” - 0,0 bottom left “kOfxImageEffectHostPropNativeOriginTopLeft” - 0,0 top left “kOfxImageEffectHostPropNativeOriginCenter” - 0,0 center (screen space)
This property is set to kOfxHostNativeOriginBottomLeft pre V1.4 and was to be discovered by plug-ins. This is useful for drawing overlay for points… so everything matches the rest of the app (for example expression linking to other tools, or simply match the reported location of the host viewer).
-
kOfxImageEffectPropInteractiveRenderStatus
Property that indicates if a plugin is being rendered in response to user interaction.
Type - int X 1
Property Set - read only property on the inArgs of the following actions…
Valid Values -
0 - the host is rendering the instance due to some reason other than an interactive tweak on a UI,
1 - the instance is being rendered because a user is modifying parameters in an interactive session.
This property is set to 1 on all render calls that have been triggered because a user is actively modifying an effect (or up stream effect) in an interactive session. This typically means that the effect is not being rendered as a part of a sequence, but as a single frame.
-
kOfxImageEffectPluginPropGrouping
Indicates the effect group for this plugin.
Type - UTF8 string X 1
Property Set - plugin descriptor (read/write)
Default - “”
This is purely a user interface hint for the host so it can group related effects on any menus it may have.
-
kOfxImageEffectPropSupportsOverlays
Indicates whether a host support image effect ImageEffectOverlays.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - This must be one of
0 - the host won’t allow a plugin to draw a GUI over the output image,
1 - the host will allow a plugin to draw a GUI over the output image.
-
kOfxImageEffectPluginPropOverlayInteractV1
Sets the entry for an effect’s overlay interaction.
Type - pointer X 1
Property Set - plugin descriptor (read/write)
Default - NULL
Valid Values - must point to an OfxPluginEntryPoint
The entry point pointed to must be one that handles custom interaction actions.
-
kOfxImageEffectPluginPropOverlayInteractV2
Sets the entry for an effect’s overlay interaction. Unlike kOfxImageEffectPluginPropOverlayInteractV1, the overlay interact in the plug-in is expected to implement the kOfxInteractActionDraw using the OfxDrawSuiteV1.
Type - pointer X 1
Property Set - plugin descriptor (read/write)
Default - NULL
Valid Values - must point to an OfxPluginEntryPoint
The entry point pointed to must be one that handles custom interaction actions.
-
kOfxImageEffectPropSupportsMultiResolution
Indicates whether a plugin or host support multiple resolution images.
Type - int X 1
Property Set - host descriptor (read only), plugin descriptor (read/write)
Default - 1 for plugins
Valid Values - This must be one of
0 - the plugin or host does not support multiple resolutions
1 - the plugin or host does support multiple resolutions
Multiple resolution images mean…
input and output images can be of any size
input and output images can be offset from the origin
-
kOfxImageEffectPropSupportsTiles
Indicates whether a clip, plugin or host supports tiled images.
Type - int X 1
Property Set - host descriptor (read only), plugin descriptor (read/write), clip descriptor (read/write), instance (read/write)
Default - to 1 for a plugin and clip
Valid Values - This must be one of 0 or 1
Tiled images mean that input or output images can contain pixel data that is only a subset of their full RoD.
If a clip or plugin does not support tiled images, then the host should supply full RoD images to the effect whenever it fetches one.
V1.4: It is now possible (defined) to change OfxImageEffectPropSupportsTiles in Instance Changed
-
kOfxImageEffectPropTemporalClipAccess
Indicates support for random temporal access to images in a clip.
Type - int X 1
Property Set - host descriptor (read only), plugin descriptor (read/write), clip descriptor (read/write)
Default - to 0 for a plugin and clip
Valid Values - This must be one of 0 or 1
On a host, it indicates whether the host supports temporal access to images.
On a plugin, indicates if the plugin needs temporal access to images.
On a clip, it indicates that the clip needs temporal access to images.
-
kOfxImageEffectPropContext
Indicates the context a plugin instance has been created for.
Type - string X 1
Property Set - image effect instance (read only)
Valid Values - This must be one of
-
kOfxImageEffectPropPixelDepth
Indicates the type of each component in a clip or image (after any mapping)
Type - string X 1
Property Set - clip instance (read only), image instance (read only)
Valid Values - This must be one of
kOfxBitDepthNone (implying a clip is unconnected, not valid for an image)
kOfxBitDepthByte
kOfxBitDepthShort
kOfxBitDepthHalf
kOfxBitDepthFloat
Note that for a clip, this is the value set by the clip preferences action, not the raw ‘actual’ value of the clip.
-
kOfxImageEffectPropComponents
Indicates the current component type in a clip or image (after any mapping)
Type - string X 1
Property Set - clip instance (read only), image instance (read only)
Valid Values - This must be one of
kOfxImageComponentNone (implying a clip is unconnected, not valid for an image)
kOfxImageComponentRGBA
kOfxImageComponentRGB
kOfxImageComponentAlpha
Note that for a clip, this is the value set by the clip preferences action, not the raw ‘actual’ value of the clip.
-
kOfxImagePropUniqueIdentifier
Uniquely labels an image.
Type - ASCII string X 1
Property Set - image instance (read only)
This is host set and allows a plug-in to differentiate between images. This is especially useful if a plugin caches analysed information about the image (for example motion vectors). The plugin can label the cached information with this identifier. If a user connects a different clip to the analysed input, or the image has changed in some way then the plugin can detect this via an identifier change and re-evaluate the cached information.
-
kOfxImageClipPropContinuousSamples
Clip and action argument property which indicates that the clip can be sampled continously.
Type - int X 1
Property Set - clip instance (read only), as an out argument to kOfxImageEffectActionGetClipPreferences action (read/write)
Default - 0 as an out argument to the kOfxImageEffectActionGetClipPreferences action
Valid Values - This must be one of…
0 if the images can only be sampled at discreet times (eg: the clip is a sequence of frames),
1 if the images can only be sampled continuously (eg: the clip is infact an animating roto spline and can be rendered anywhen).
If this is set to true, then the frame rate of a clip is effectively infinite, so to stop arithmetic errors the frame rate should then be set to 0.
-
kOfxImageClipPropUnmappedPixelDepth
Indicates the type of each component in a clip before any mapping by clip preferences.
Type - string X 1
Property Set - clip instance (read only)
Valid Values - This must be one of
kOfxBitDepthNone (implying a clip is unconnected image)
kOfxBitDepthByte
kOfxBitDepthShort
kOfxBitDepthHalf
kOfxBitDepthFloat
This is the actual value of the component depth, before any mapping by clip preferences.
-
kOfxImageClipPropUnmappedComponents
Indicates the current ‘raw’ component type on a clip before any mapping by clip preferences.
Type - string X 1
Property Set - clip instance (read only),
Valid Values - This must be one of
kOfxImageComponentNone (implying a clip is unconnected)
kOfxImageComponentRGBA
kOfxImageComponentRGB
kOfxImageComponentAlpha
-
kOfxImageEffectPropPreMultiplication
Indicates the premultiplication state of a clip or image.
Type - string X 1
Property Set - clip instance (read only), image instance (read only), out args property in the kOfxImageEffectActionGetClipPreferences action (read/write)
Valid Values - This must be one of
kOfxImageOpaque - the image is opaque and so has no premultiplication state
kOfxImagePreMultiplied - the image is premultiplied by its alpha
kOfxImageUnPreMultiplied - the image is unpremultiplied
See the documentation on clip preferences for more details on how this is used with the kOfxImageEffectActionGetClipPreferences action.
-
kOfxImageOpaque
Used to flag the alpha of an image as opaque
-
kOfxImagePreMultiplied
Used to flag an image as premultiplied
-
kOfxImageUnPreMultiplied
Used to flag an image as unpremultiplied
-
kOfxImageEffectPropSupportedPixelDepths
Indicates the bit depths support by a plug-in or host.
Type - string X N
Property Set - host descriptor (read only), plugin descriptor (read/write)
Default - plugin descriptor none set
Valid Values - This must be one of
kOfxBitDepthNone (implying a clip is unconnected, not valid for an image)
kOfxBitDepthByte
kOfxBitDepthShort
kOfxBitDepthHalf
kOfxBitDepthFloat
The default for a plugin is to have none set, the plugin must define at least one in its describe action.
-
kOfxImageEffectPropSupportedComponents
Indicates the components supported by a clip or host,.
Type - string X N
Property Set - host descriptor (read only), clip descriptor (read/write)
Valid Values - This must be one of
kOfxImageComponentNone (implying a clip is unconnected)
kOfxImageComponentRGBA
kOfxImageComponentRGB
kOfxImageComponentAlpha
This list of strings indicate what component types are supported by a host or are expected as input to a clip.
The default for a clip descriptor is to have none set, the plugin must define at least one in its define function
-
kOfxImageClipPropOptional
Indicates if a clip is optional.
Type - int X 1
Property Set - clip descriptor (read/write)
Default - 0
Valid Values - This must be one of 0 or 1
-
kOfxImageClipPropIsMask
Indicates that a clip is intended to be used as a mask input.
Type - int X 1
Property Set - clip descriptor (read/write)
Default - 0
Valid Values - This must be one of 0 or 1
Set this property on any clip which will only ever have single channel alpha images fetched from it. Typically on an optional clip such as a junk matte in a keyer.
This property acts as a hint to hosts indicating that they could feed the effect from a rotoshape (or similar) rather than an ‘ordinary’ clip.
-
kOfxImagePropPixelAspectRatio
The pixel aspect ratio of a clip or image.
Type - double X 1
Property Set - clip instance (read only), image instance (read only) and kOfxImageEffectActionGetClipPreferences action out args property (read/write)
-
kOfxImageEffectPropFrameRate
The frame rate of a clip or instance’s project.
Type - double X 1
Property Set - clip instance (read only), effect instance (read only) and kOfxImageEffectActionGetClipPreferences action out args property (read/write)
For an input clip this is the frame rate of the clip.
For an output clip, the frame rate mapped via pixel preferences.
For an instance, this is the frame rate of the project the effect is in.
For the outargs property in the kOfxImageEffectActionGetClipPreferences action, it is used to change the frame rate of the ouput clip.
-
kOfxImageEffectPropUnmappedFrameRate
Indicates the original unmapped frame rate (frames/second) of a clip.
Type - double X 1
Property Set - clip instance (read only),
If a plugin changes the output frame rate in the pixel preferences action, this property allows a plugin to get to the original value.
-
kOfxImageEffectPropFrameStep
The frame step used for a sequence of renders.
Type - double X 1
Property Set - an in argument for the kOfxImageEffectActionBeginSequenceRender action (read only)
Valid Values - can be any positive value, but typically
1 for frame based material
0.5 for field based material
-
kOfxImageEffectPropFrameRange
The frame range over which a clip has images.
Type - double X 2
Property Set - clip instance (read only)
Dimension 0 is the first frame for which the clip can produce valid data.
Dimension 1 is the last frame for which the clip can produce valid data.
-
kOfxImageEffectPropUnmappedFrameRange
The unmaped frame range over which an output clip has images.
Type - double X 2
Property Set - clip instance (read only)
Dimension 0 is the first frame for which the clip can produce valid data.
Dimension 1 is the last frame for which the clip can produce valid data.
If a plugin changes the output frame rate in the pixel preferences action, it will affect the frame range of the output clip, this property allows a plugin to get to the original value.
-
kOfxImageClipPropConnected
Says whether the clip is actually connected at the moment.
Type - int X 1
Property Set - clip instance (read only)
Valid Values - This must be one of 0 or 1
An instance may have a clip may not be connected to an object that can produce image data. Use this to find out.
Any clip that is not optional will always be connected during a render action. However, during interface actions, even non optional clips may be unconnected.
-
kOfxImageEffectFrameVarying
Indicates whether an effect will generate different images from frame to frame.
Type - int X 1
Property Set - out argument to kOfxImageEffectActionGetClipPreferences action (read/write).
Default - 0
Valid Values - This must be one of 0 or 1
This property indicates whether a plugin will generate a different image from frame to frame, even if no parameters or input image changes. For example a generater that creates random noise pixel at each frame.
-
kOfxImageEffectPropRenderScale
The proxy render scale currently being applied.
Type - double X 2
Property Set - an image instance (read only) and as read only an in argument on the following actions,
This should be applied to any spatial parameters to position them correctly. Not that the ‘x’ value does not include any pixel aspect ratios.
-
kOfxImageEffectPropRenderQualityDraft
Indicates whether an effect can take quality shortcuts to improve speed.
Type - int X 1
Property Set - render calls, host (read-only)
Default - 0 - 0: Best Quality (1: Draft)
Valid Values - This must be one of 0 or 1
This property indicates that the host provides the plug-in the option to render in Draft/Preview mode. This is useful for applications that must support fast scrubbing. These allow a plug-in to take short-cuts for improved performance when the situation allows and it makes sense, for example to generate thumbnails with effects applied. For example switch to a cheaper interpolation type or rendering mode. A plugin should expect frames rendered in this manner that will not be stucked in host cache unless the cache is only used in the same draft situations. If an host does not support that property a value of 0 is assumed. Also note that some hosts do implement kOfxImageEffectPropRenderScale - these two properties can be used independently.
-
kOfxImageEffectPropProjectExtent
The extent of the current project in canonical coordinates.
Type - double X 2
Property Set - a plugin instance (read only)
The extent is the size of the ‘output’ for the current project. See NormalisedCoordinateSystem for more infomation on the project extent.
The extent is in canonical coordinates and only returns the top right position, as the extent is always rooted at 0,0.
For example a PAL SD project would have an extent of 768, 576.
-
kOfxImageEffectPropProjectSize
The size of the current project in canonical coordinates.
Type - double X 2
Property Set - a plugin instance (read only)
The size of a project is a sub set of the kOfxImageEffectPropProjectExtent. For example a project may be a PAL SD project, but only be a letter-box within that. The project size is the size of this sub window.
The project size is in canonical coordinates.
See NormalisedCoordinateSystem for more infomation on the project extent.
-
kOfxImageEffectPropProjectOffset
The offset of the current project in canonical coordinates.
Type - double X 2
Property Set - a plugin instance (read only)
The offset is related to the kOfxImageEffectPropProjectSize and is the offset from the origin of the project ‘subwindow’.
For example for a PAL SD project that is in letterbox form, the project offset is the offset to the bottom left hand corner of the letter box.
The project offset is in canonical coordinates.
See NormalisedCoordinateSystem for more infomation on the project extent.
-
kOfxImageEffectPropProjectPixelAspectRatio
The pixel aspect ratio of the current project.
Type - double X 1
Property Set - a plugin instance (read only)
-
kOfxImageEffectInstancePropEffectDuration
The duration of the effect.
Type - double X 1
Property Set - a plugin instance (read only)
This contains the duration of the plug-in effect, in frames.
-
kOfxImageClipPropFieldOrder
Which spatial field occurs temporally first in a frame.
Type - string X 1
Property Set - a clip instance (read only)
Valid Values - This must be one of
kOfxImageFieldNone - the material is unfielded
kOfxImageFieldLower - the material is fielded, with image rows 0,2,4…. occuring first in a frame
kOfxImageFieldUpper - the material is fielded, with image rows line 1,3,5…. occuring first in a frame
-
kOfxImagePropData
The pixel data pointer of an image.
Type - pointer X 1
Property Set - an image instance (read only)
This property contains one of:
a pointer to memory that is the lower left hand corner of an image
a pointer to CUDA memory, if the Render action arguments includes kOfxImageEffectPropCudaEnabled=1
an id<MTLBuffer>, if the Render action arguments includes kOfxImageEffectPropMetalEnabled=1
a cl_mem, if the Render action arguments includes kOfxImageEffectPropOpenCLEnabled=1
See kOfxImageEffectPropCudaEnabled, kOfxImageEffectPropMetalEnabled and kOfxImageEffectPropOpenCLEnabled
-
kOfxImagePropBounds
The bounds of an image’s pixels.
Type - integer X 4
Property Set - an image instance (read only)
The bounds, in PixelCoordinates, are of the addressable pixels in an image’s data pointer.
The order of the values is x1, y1, x2, y2.
X values are x1 <= X < x2 Y values are y1 <= Y < y2
For less than full frame images, the pixel bounds will be contained by the kOfxImagePropRegionOfDefinition bounds.
-
kOfxImagePropRegionOfDefinition
The full region of definition of an image.
Type - integer X 4
Property Set - an image instance (read only)
An image’s region of definition, in PixelCoordinates, is the full frame area of the image plane that the image covers.
The order of the values is x1, y1, x2, y2.
X values are x1 <= X < x2 Y values are y1 <= Y < y2
The kOfxImagePropBounds property contains the actuall addressable pixels in an image, which may be less than its full region of definition.
-
kOfxImagePropRowBytes
The number of bytes in a row of an image.
Type - integer X 1
Property Set - an image instance (read only)
For various alignment reasons, a row of pixels may need to be padded at the end with several bytes before the next row starts in memory.
This property indicates the number of bytes in a row of pixels. This will be at least sizeof(PIXEL) * (bounds.x2-bounds.x1). Where bounds is fetched from the kOfxImagePropBounds property.
Note that (for CPU images only, not CUDA/Metal/OpenCL Buffers, nor OpenGL textures accessed via the OpenGL Render Suite) row bytes can be negative, which allows hosts with a native top down row order to pass image into OFX without having to repack pixels. Row bytes is not supported for OpenCL Images.
-
kOfxImagePropField
Which fields are present in the image.
Type - string X 1
Property Set - an image instance (read only)
Valid Values - This must be one of
kOfxImageFieldNone - the image is an unfielded frame
kOfxImageFieldBoth - the image is fielded and contains both interlaced fields
kOfxImageFieldLower - the image is fielded and contains a single field, being the lower field (rows 0,2,4…)
kOfxImageFieldUpper - the image is fielded and contains a single field, being the upper field (rows 1,3,5…)
-
kOfxImageEffectPluginPropFieldRenderTwiceAlways
Controls how a plugin renders fielded footage.
Type - integer X 1
Property Set - a plugin descriptor (read/write)
Default - 1
Valid Values - This must be one of
0 - the plugin is to have its render function called twice, only if there is animation in any of its parameters
1 - the plugin is to have its render function called twice always
-
kOfxImageClipPropFieldExtraction
Controls how a plugin fetched fielded imagery from a clip.
Type - string X 1
Property Set - a clip descriptor (read/write)
Default - kOfxImageFieldDoubled
Valid Values - This must be one of
kOfxImageFieldBoth - fetch a full frame interlaced image
kOfxImageFieldSingle - fetch a single field, making a half height image
kOfxImageFieldDoubled - fetch a single field, but doubling each line and so making a full height image
This controls how a plug-in wishes to fetch images from a fielded clip, so it can tune it behaviour when it renders fielded footage.
Note that if it fetches kOfxImageFieldSingle and the host stores images natively as both fields interlaced, it can return a single image by doubling rowbytes and tweaking the starting address of the image data. This saves on a buffer copy.
-
kOfxImageEffectPropFieldToRender
Indicates which field is being rendered.
Type - string X 1
Property Set - a read only in argument property to kOfxImageEffectActionRender and kOfxImageEffectActionIsIdentity
Valid Values - this must be one of
kOfxImageFieldNone - there are no fields to deal with, all images are full frame
kOfxImageFieldBoth - the imagery is fielded and both scan lines should be renderred
kOfxImageFieldLower - the lower field is being rendered (lines 0,2,4…)
kOfxImageFieldUpper - the upper field is being rendered (lines 1,3,5…)
-
kOfxImageEffectPropRegionOfDefinition
Used to indicate the region of definition of a plug-in.
Type - double X 4
Property Set - a read/write out argument property to the kOfxImageEffectActionGetRegionOfDefinition action
Default - see kOfxImageEffectActionGetRegionOfDefinition
The order of the values is x1, y1, x2, y2.
This will be in CanonicalCoordinates
-
kOfxImageEffectPropRegionOfInterest
The value of a region of interest.
Type - double X 4
Property Set - a read only in argument property to the kOfxImageEffectActionGetRegionsOfInterest action
A host passes this value into the region of interest action to specify the region it is interested in rendering.
The order of the values is x1, y1, x2, y2.
This will be in CanonicalCoordinates.
-
kOfxImageEffectPropRenderWindow
The region to be rendered.
Type - integer X 4
Property Set - a read only in argument property to the kOfxImageEffectActionRender and kOfxImageEffectActionIsIdentity actions
The order of the values is x1, y1, x2, y2.
This will be in PixelCoordinates
-
kOfxImageFieldNone
String used to label imagery as having no fields
-
kOfxImageFieldLower
String used to label the lower field (scan lines 0,2,4…) of fielded imagery
-
kOfxImageFieldUpper
String used to label the upper field (scan lines 1,3,5…) of fielded imagery
-
kOfxImageFieldBoth
String used to label both fields of fielded imagery, indicating interlaced footage
-
kOfxImageFieldSingle
String used to label an image that consists of a single field, and so is half height
-
kOfxImageFieldDoubled
String used to label an image that consists of a single field, but each scan line is double, and so is full height
-
kOfxImageEffectOutputClipName
String that is the name of the standard OFX output clip.
-
kOfxImageEffectSimpleSourceClipName
String that is the name of the standard OFX single source input clip.
-
kOfxImageEffectTransitionSourceFromClipName
String that is the name of the ‘from’ clip in the OFX transition context.
-
kOfxImageEffectTransitionSourceToClipName
String that is the name of the ‘from’ clip in the OFX transition context.
-
kOfxImageEffectTransitionParamName
the name of the mandated ‘Transition’ param for the transition context
-
kOfxImageEffectRetimerParamName
the name of the mandated ‘SourceTime’ param for the retime context
-
kOfxImageEffectSuite
the string that names image effect suites, passed to OfxHost::fetchSuite
-
kOfxStatErrImageFormat
Error code for incorrect image formats.
Typedefs
-
typedef struct OfxImageEffectStruct *OfxImageEffectHandle
Blind declaration of an OFX image effect.
-
typedef struct OfxImageClipStruct *OfxImageClipHandle
Blind declaration of an OFX image effect.
-
typedef struct OfxImageMemoryStruct *OfxImageMemoryHandle
Blind declaration for an handle to image memory returned by the image memory management routines.
-
typedef struct OfxImageEffectSuiteV1 OfxImageEffectSuiteV1
The OFX suite for image effects.
This suite provides the functions needed by a plugin to defined and use an image effect plugin.
-
_ofxImageEffect_h_
- file ofxInteract.h
- #include “ofxCore.h”
Contains the API for ofx plugin defined GUIs and interaction.
Defines
-
kOfxInteractSuite
-
kOfxInteractPropSlaveToParam
The set of parameters on which a value change will trigger a redraw for an interact.
Type - string X N
Property Set - interact instance property (read/write)
Default - no values set
Valid Values - the name of any parameter associated with this interact.
If the interact is representing the state of some set of OFX parameters, then is will need to be redrawn if any of those parameters’ values change. This multi-dimensional property links such parameters to the interact.
The interact can be slaved to multiple parameters (setting index 0, then index 1 etc…)
-
kOfxInteractPropPixelScale
The size of a real screen pixel under the interact’s canonical projection.
Type - double X 2
Property Set - interact instance and actions (read only)
-
kOfxInteractPropBackgroundColour
The background colour of the application behind an interact instance.
Type - double X 3
Property Set - read only on the interact instance and in argument to the kOfxInteractActionDraw action
Valid Values - from 0 to 1
The components are in the order red, green then blue.
-
kOfxInteractPropSuggestedColour
The suggested colour to draw a widget in an interact, typically for overlays.
Type - double X 3
Property Set - read only on the interact instance
Default - 1.0
Valid Values - greater than or equal to 0.0
Some applications allow the user to specify colours of any overlay via a colour picker, this property represents the value of that colour. Plugins are at liberty to use this or not when they draw an overlay.
If a host does not support such a colour, it should return kOfxStatReplyDefault
-
kOfxInteractPropPenPosition
The position of the pen in an interact.
Type - double X 2
Property Set - read only in argument to the kOfxInteractActionPenMotion, kOfxInteractActionPenDown and kOfxInteractActionPenUp actions
This value passes the postion of the pen into an interact. This is in the interact’s canonical coordinates.
-
kOfxInteractPropPenViewportPosition
The position of the pen in an interact in viewport coordinates.
Type - int X 2
Property Set - read only in argument to the kOfxInteractActionPenMotion, kOfxInteractActionPenDown and kOfxInteractActionPenUp actions
This value passes the postion of the pen into an interact. This is in the interact’s openGL viewport coordinates, with 0,0 being at the bottom left.
-
kOfxInteractPropPenPressure
The pressure of the pen in an interact.
Type - double X 1
Property Set - read only in argument to the kOfxInteractActionPenMotion, kOfxInteractActionPenDown and kOfxInteractActionPenUp actions
Valid Values - from 0 (no pressure) to 1 (maximum pressure)
This is used to indicate the status of the ‘pen’ in an interact. If a pen has only two states (eg: a mouse button), these should map to 0.0 and 1.0.
-
kOfxInteractPropBitDepth
Indicates whether the dits per component in the interact’s openGL frame buffer.
Type - int X 1
Property Set - interact instance and descriptor (read only)
-
kOfxInteractPropHasAlpha
Indicates whether the interact’s frame buffer has an alpha component or not.
Type - int X 1
Property Set - interact instance and descriptor (read only)
Valid Values - This must be one of
0 indicates no alpha component
1 indicates an alpha component
-
kOfxActionDescribeInteract
This action is the first action passed to an interact. It is where an interact defines how it behaves and the resources it needs to function. If not trapped, the default action is for the host to carry on as normal Note that the handle passed in acts as a descriptor for, rather than an instance of the interact.
- Parameters:
handle – handle to the interact descriptor, cast to an OfxInteractHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
The plugin has been loaded and the effect described.
- Returns:
kOfxStatOK the action was trapped and all was well
kOfxStatErrMemory in which case describe may be called again after a memory purge
kOfxStatFailed something was wrong, the host should ignore the interact
-
kOfxActionCreateInstanceInteract
This action is the first action passed to an interact instance after its creation. It is there to allow a plugin to create any per-instance data structures it may need.
- Parameters:
handle – handle to the interact instance, cast to an OfxInteractHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionDescribe has been called on this interact
- Post:
the instance pointer will be valid until the kOfxActionDestroyInstance action is passed to the plug-in with the same instance handle
- Returns:
kOfxStatOK the action was trapped and all was well
kOfxStatReplyDefault the action was ignored, but all was well anyway
kOfxStatErrMemory in which case this may be called again after a memory purge
kOfxStatFailed in which case the host should ignore this interact
-
kOfxActionDestroyInstanceInteract
This action is the last passed to an interact’s instance before its destruction. It is there to allow a plugin to destroy any per-instance data structures it may have created.
- Parameters:
handle – handle to the interact instance, cast to an OfxInteractHandle
inArgs – is redundant and is set to NULL
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the handle,
the instance has not had any of its members destroyed yet
- Post:
the instance pointer is no longer valid and any operation on it will be undefined
- Returns:
To some extent, what is returned is moot, a bit like throwing an exception in a C++ destructor, so the host should continue destruction of the instance regardless
kOfxStatOK the action was trapped and all was well
kOfxStatReplyDefault the action was ignored as the effect had nothing to do
kOfxStatFailed something went wrong, but no error code appropriate.
-
kOfxInteractActionDraw
This action is issued to an interact whenever the host needs the plugin to redraw the given interact.
The interact should either issue OpenGL calls to draw itself, or use DrawSuite calls.
If this is called via kOfxImageEffectPluginPropOverlayInteractV2, drawing MUST use DrawSuite.
If this is called via kOfxImageEffectPluginPropOverlayInteractV1, drawing SHOULD use OpenGL. Some existing plugins may use DrawSuite via kOfxImageEffectPluginPropOverlayInteractV1 if it’s supported by the host, but this is discouraged.
Note that the interact may (in the case of custom parameter GUIS) or may not (in the case of image effect overlays) be required to swap buffers, that is up to the kind of interact.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin
kOfxPropEffectInstance a handle to the effect for which the interact has been,
kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels
kOfxInteractPropBackgroundColour the background colour of the application behind the current view
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle
the openGL context for this interact has been set
the projection matrix will correspond to the interact’s cannonical view
- Returns:
kOfxStatOK the action was trapped and all was well
kOfxStatReplyDefault the action was ignored
kOfxStatFailed something went wrong, the host should ignore this interact in future
-
kOfxInteractActionPenMotion
This action is issued whenever the pen moves an the interact’s has focus. It should be issued whether the pen is currently up or down. No openGL calls should be issued by the plug-in during this action.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin
kOfxPropEffectInstance a handle to the effect for which the interact has been,
kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels
kOfxInteractPropBackgroundColour the background colour of the application behind the current view
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
kOfxInteractPropPenPosition postion of the pen in,
kOfxInteractPropPenViewportPosition position of the pen in,
kOfxInteractPropPenPressure the pressure of the pen,
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle
the current instance handle has had kOfxInteractActionGainFocus called on it
- Post:
if the instance returns kOfxStatOK the host should not pass the pen motion to any other interactive object it may own that shares the same view.
- Returns:
kOfxStatOK the action was trapped and the host should not pass the event to other objects it may own
kOfxStatReplyDefault the action was not trapped and the host can deal with it if it wants
-
kOfxInteractActionPenDown
This action is issued when a pen transitions for the ‘up’ to the ‘down’ state. No openGL calls should be issued by the plug-in during this action.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin,
kOfxPropEffectInstance a handle to the effect for which the interact has been,
kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels
kOfxInteractPropBackgroundColour the background colour of the application behind the current view
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
kOfxInteractPropPenPosition position of the pen in
kOfxInteractPropPenViewportPosition position of the pen in
kOfxInteractPropPenPressure the pressure of the pen
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
the current instance handle has had kOfxInteractActionGainFocus called on it
- Post:
if the instance returns kOfxStatOK, the host should not pass the pen motion to any other interactive object it may own that shares the same view.
- Returns:
kOfxStatOK, the action was trapped and the host should not pass the event to other objects it may own
kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
-
kOfxInteractActionPenUp
This action is issued when a pen transitions for the ‘down’ to the ‘up’ state. No openGL calls should be issued by the plug-in during this action.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin,
kOfxPropEffectInstance a handle to the effect for which the interact has been,
kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels
kOfxInteractPropBackgroundColour the background colour of the application behind the current view
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
kOfxInteractPropPenPosition position of the pen in
kOfxInteractPropPenViewportPosition position of the pen in
kOfxInteractPropPenPressure the pressure of the pen
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
the current instance handle has had kOfxInteractActionGainFocus called on it
- Post:
if the instance returns kOfxStatOK, the host should not pass the pen motion to any other interactive object it may own that shares the same view.
- Returns:
kOfxStatOK, the action was trapped and the host should not pass the event to other objects it may own
kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
-
kOfxInteractActionKeyDown
This action is issued when a key on the keyboard is depressed. No openGL calls should be issued by the plug-in during this action.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin
kOfxPropEffectInstance a handle to the effect for which the interact has been,
kOfxPropKeySym single integer value representing the key that was manipulated, this may not have a UTF8 representation (eg: a return key)
kOfxPropKeyString UTF8 string representing a character key that was pressed, some keys have no UTF8 encoding, in which case this is “”
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
the current instance handle has had kOfxInteractActionGainFocus called on it
- Post:
if the instance returns kOfxStatOK, the host should not pass the pen motion to any other interactive object it may own that shares the same focus.
- Returns:
kOfxStatOK , the action was trapped and the host should not pass the event to other objects it may own
kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
-
kOfxInteractActionKeyUp
This action is issued when a key on the keyboard is released. No openGL calls should be issued by the plug-in during this action.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin
kOfxPropEffectInstance a handle to the effect for which the interact has been,
kOfxPropKeySym single integer value representing the key that was manipulated, this may not have a UTF8 representation (eg: a return key)
kOfxPropKeyString UTF8 string representing a character key that was pressed, some keys have no UTF8 encoding, in which case this is “”
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
the current instance handle has had kOfxInteractActionGainFocus called on it
- Post:
if the instance returns kOfxStatOK, the host should not pass the pen motion to any other interactive object it may own that shares the same focus.
- Returns:
kOfxStatOK , the action was trapped and the host should not pass the event to other objects it may own
kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
-
kOfxInteractActionKeyRepeat
This action is issued when a key on the keyboard is repeated. No openGL calls should be issued by the plug-in during this action.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin
kOfxPropEffectInstance a handle to the effect for which the interact has been,
kOfxPropKeySym single integer value representing the key that was manipulated, this may not have a UTF8 representation (eg: a return key)
kOfxPropKeyString UTF8 string representing a character key that was pressed, some keys have no UTF8 encoding, in which case this is “”
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
the current instance handle has had kOfxInteractActionGainFocus called on it
- Post:
if the instance returns kOfxStatOK, the host should not pass the pen motion to any other interactive object it may own that shares the same focus.
- Returns:
kOfxStatOK , the action was trapped and the host should not pass the event to other objects it may own
kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
-
kOfxInteractActionGainFocus
This action is issued when an interact gains input focus. No openGL calls should be issued by the plug-in during this action.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin
kOfxPropEffectInstance a handle to the effect for which the interact is being used on,
kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels,
kOfxInteractPropBackgroundColour the background colour of the application behind the current view
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
- Returns:
kOfxStatOK the action was trapped
kOfxStatReplyDefault the action was not trapped
-
kOfxInteractActionLoseFocus
This action is issued when an interact loses input focus. No openGL calls should be issued by the plug-in during this action.
- Parameters:
handle – handle to an interact instance, cast to an OfxInteractHandle
inArgs – has the following properties on an image effect plugin
kOfxPropEffectInstance a handle to the effect for which the interact is being used on,
kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels,
kOfxInteractPropBackgroundColour the background colour of the application behind the current view
kOfxPropTime the effect time at which changed occured
kOfxImageEffectPropRenderScale the render scale applied to any image fetched
outArgs – is redundant and is set to NULL
- Pre:
kOfxActionCreateInstance has been called on the instance handle,
- Returns:
kOfxStatOK the action was trapped
kOfxStatReplyDefault the action was not trapped
Typedefs
-
typedef struct OfxInteract *OfxInteractHandle
Blind declaration of an OFX interactive gui.
-
typedef struct OfxInteractSuiteV1 OfxInteractSuiteV1
OFX suite that allows an effect to interact with an openGL window so as to provide custom interfaces.
-
kOfxInteractSuite
- file ofxKeySyms.h
Defines
-
kOfxPropKeySym
Property used to indicate which a key on the keyboard or a button on a button device has been pressed.
Type - int X 1
Property Set - an read only in argument for the actions kOfxInteractActionKeyDown, kOfxInteractActionKeyUp and kOfxInteractActionKeyRepeat.
Valid Values - one of any specified by #defines in the file ofxKeySyms.h.
This property represents a raw key press, it does not represent the ‘character value’ of the key.
This property is associated with a kOfxPropKeyString property, which encodes the UTF8 value for the keypress/button press. Some keys (for example arrow keys) have no UTF8 equivalant.
Some keys, especially on non-english language systems, may have a UTF8 value, but not a keysym values, in these cases, the keysym will have a value of kOfxKey_Unknown, but the kOfxPropKeyString property will still be set with the UTF8 value.
-
kOfxPropKeyString
This property encodes a single keypresses that generates a unicode code point. The value is stored as a UTF8 string.
Type - C string X 1, UTF8
Property Set - an read only in argument for the actions kOfxInteractActionKeyDown, kOfxInteractActionKeyUp and kOfxInteractActionKeyRepeat.
Valid Values - a UTF8 string representing a single character, or the empty string.
This property represents the UTF8 encode value of a single key press by a user in an OFX interact.
This property is associated with a kOfxPropKeySym which represents an integer value for the key press. Some keys (for example arrow keys) have no UTF8 equivalant, in which case this is set to the empty string “”, and the associate kOfxPropKeySym is set to the equivilant raw key press.
Some keys, especially on non-english language systems, may have a UTF8 value, but not a keysym values, in these cases, the keysym will have a value of kOfxKey_Unknown, but the kOfxPropKeyString property will still be set with the UTF8 value.
-
kOfxKey_Unknown
-
kOfxKey_BackSpace
-
kOfxKey_Tab
-
kOfxKey_Linefeed
-
kOfxKey_Clear
-
kOfxKey_Return
-
kOfxKey_Pause
-
kOfxKey_Scroll_Lock
-
kOfxKey_Sys_Req
-
kOfxKey_Escape
-
kOfxKey_Delete
-
kOfxKey_Multi_key
-
kOfxKey_SingleCandidate
-
kOfxKey_MultipleCandidate
-
kOfxKey_PreviousCandidate
-
kOfxKey_Kanji
-
kOfxKey_Muhenkan
-
kOfxKey_Henkan_Mode
-
kOfxKey_Henkan
-
kOfxKey_Romaji
-
kOfxKey_Hiragana
-
kOfxKey_Katakana
-
kOfxKey_Hiragana_Katakana
-
kOfxKey_Zenkaku
-
kOfxKey_Hankaku
-
kOfxKey_Zenkaku_Hankaku
-
kOfxKey_Touroku
-
kOfxKey_Massyo
-
kOfxKey_Kana_Lock
-
kOfxKey_Kana_Shift
-
kOfxKey_Eisu_Shift
-
kOfxKey_Eisu_toggle
-
kOfxKey_Zen_Koho
-
kOfxKey_Mae_Koho
-
kOfxKey_Home
-
kOfxKey_Left
-
kOfxKey_Up
-
kOfxKey_Right
-
kOfxKey_Down
-
kOfxKey_Prior
-
kOfxKey_Page_Up
-
kOfxKey_Next
-
kOfxKey_Page_Down
-
kOfxKey_End
-
kOfxKey_Begin
-
kOfxKey_Select
-
kOfxKey_Print
-
kOfxKey_Execute
-
kOfxKey_Insert
-
kOfxKey_Undo
-
kOfxKey_Redo
-
kOfxKey_Menu
-
kOfxKey_Find
-
kOfxKey_Cancel
-
kOfxKey_Help
-
kOfxKey_Break
-
kOfxKey_Mode_switch
-
kOfxKey_script_switch
-
kOfxKey_Num_Lock
-
kOfxKey_KP_Space
-
kOfxKey_KP_Tab
-
kOfxKey_KP_Enter
-
kOfxKey_KP_F1
-
kOfxKey_KP_F2
-
kOfxKey_KP_F3
-
kOfxKey_KP_F4
-
kOfxKey_KP_Home
-
kOfxKey_KP_Left
-
kOfxKey_KP_Up
-
kOfxKey_KP_Right
-
kOfxKey_KP_Down
-
kOfxKey_KP_Prior
-
kOfxKey_KP_Page_Up
-
kOfxKey_KP_Next
-
kOfxKey_KP_Page_Down
-
kOfxKey_KP_End
-
kOfxKey_KP_Begin
-
kOfxKey_KP_Insert
-
kOfxKey_KP_Delete
-
kOfxKey_KP_Equal
-
kOfxKey_KP_Multiply
-
kOfxKey_KP_Add
-
kOfxKey_KP_Separator
-
kOfxKey_KP_Subtract
-
kOfxKey_KP_Decimal
-
kOfxKey_KP_Divide
-
kOfxKey_KP_0
-
kOfxKey_KP_1
-
kOfxKey_KP_2
-
kOfxKey_KP_3
-
kOfxKey_KP_4
-
kOfxKey_KP_5
-
kOfxKey_KP_6
-
kOfxKey_KP_7
-
kOfxKey_KP_8
-
kOfxKey_KP_9
-
kOfxKey_F1
-
kOfxKey_F2
-
kOfxKey_F3
-
kOfxKey_F4
-
kOfxKey_F5
-
kOfxKey_F6
-
kOfxKey_F7
-
kOfxKey_F8
-
kOfxKey_F9
-
kOfxKey_F10
-
kOfxKey_F11
-
kOfxKey_L1
-
kOfxKey_F12
-
kOfxKey_L2
-
kOfxKey_F13
-
kOfxKey_L3
-
kOfxKey_F14
-
kOfxKey_L4
-
kOfxKey_F15
-
kOfxKey_L5
-
kOfxKey_F16
-
kOfxKey_L6
-
kOfxKey_F17
-
kOfxKey_L7
-
kOfxKey_F18
-
kOfxKey_L8
-
kOfxKey_F19
-
kOfxKey_L9
-
kOfxKey_F20
-
kOfxKey_L10
-
kOfxKey_F21
-
kOfxKey_R1
-
kOfxKey_F22
-
kOfxKey_R2
-
kOfxKey_F23
-
kOfxKey_R3
-
kOfxKey_F24
-
kOfxKey_R4
-
kOfxKey_F25
-
kOfxKey_R5
-
kOfxKey_F26
-
kOfxKey_R6
-
kOfxKey_F27
-
kOfxKey_R7
-
kOfxKey_F28
-
kOfxKey_R8
-
kOfxKey_F29
-
kOfxKey_R9
-
kOfxKey_F30
-
kOfxKey_R10
-
kOfxKey_F31
-
kOfxKey_R11
-
kOfxKey_F32
-
kOfxKey_R12
-
kOfxKey_F33
-
kOfxKey_R13
-
kOfxKey_F34
-
kOfxKey_R14
-
kOfxKey_F35
-
kOfxKey_R15
-
kOfxKey_Shift_L
-
kOfxKey_Shift_R
-
kOfxKey_Control_L
-
kOfxKey_Control_R
-
kOfxKey_Caps_Lock
-
kOfxKey_Shift_Lock
-
kOfxKey_Meta_L
-
kOfxKey_Meta_R
-
kOfxKey_Alt_L
-
kOfxKey_Alt_R
-
kOfxKey_Super_L
-
kOfxKey_Super_R
-
kOfxKey_Hyper_L
-
kOfxKey_Hyper_R
-
kOfxKey_space
-
kOfxKey_exclam
-
kOfxKey_quotedbl
-
kOfxKey_numbersign
-
kOfxKey_dollar
-
kOfxKey_percent
-
kOfxKey_ampersand
-
kOfxKey_apostrophe
-
kOfxKey_quoteright
-
kOfxKey_parenleft
-
kOfxKey_parenright
-
kOfxKey_asterisk
-
kOfxKey_plus
-
kOfxKey_comma
-
kOfxKey_minus
-
kOfxKey_period
-
kOfxKey_slash
-
kOfxKey_0
-
kOfxKey_1
-
kOfxKey_2
-
kOfxKey_3
-
kOfxKey_4
-
kOfxKey_5
-
kOfxKey_6
-
kOfxKey_7
-
kOfxKey_8
-
kOfxKey_9
-
kOfxKey_colon
-
kOfxKey_semicolon
-
kOfxKey_less
-
kOfxKey_equal
-
kOfxKey_greater
-
kOfxKey_question
-
kOfxKey_at
-
kOfxKey_A
-
kOfxKey_B
-
kOfxKey_C
-
kOfxKey_D
-
kOfxKey_E
-
kOfxKey_F
-
kOfxKey_G
-
kOfxKey_H
-
kOfxKey_I
-
kOfxKey_J
-
kOfxKey_K
-
kOfxKey_L
-
kOfxKey_M
-
kOfxKey_N
-
kOfxKey_O
-
kOfxKey_P
-
kOfxKey_Q
-
kOfxKey_R
-
kOfxKey_S
-
kOfxKey_T
-
kOfxKey_U
-
kOfxKey_V
-
kOfxKey_W
-
kOfxKey_X
-
kOfxKey_Y
-
kOfxKey_Z
-
kOfxKey_bracketleft
-
kOfxKey_backslash
-
kOfxKey_bracketright
-
kOfxKey_asciicircum
-
kOfxKey_underscore
-
kOfxKey_grave
-
kOfxKey_quoteleft
-
kOfxKey_a
-
kOfxKey_b
-
kOfxKey_c
-
kOfxKey_d
-
kOfxKey_e
-
kOfxKey_f
-
kOfxKey_g
-
kOfxKey_h
-
kOfxKey_i
-
kOfxKey_j
-
kOfxKey_k
-
kOfxKey_l
-
kOfxKey_m
-
kOfxKey_n
-
kOfxKey_o
-
kOfxKey_p
-
kOfxKey_q
-
kOfxKey_r
-
kOfxKey_s
-
kOfxKey_t
-
kOfxKey_u
-
kOfxKey_v
-
kOfxKey_w
-
kOfxKey_x
-
kOfxKey_y
-
kOfxKey_z
-
kOfxKey_braceleft
-
kOfxKey_bar
-
kOfxKey_braceright
-
kOfxKey_asciitilde
-
kOfxKey_nobreakspace
-
kOfxKey_exclamdown
-
kOfxKey_cent
-
kOfxKey_sterling
-
kOfxKey_currency
-
kOfxKey_yen
-
kOfxKey_brokenbar
-
kOfxKey_section
-
kOfxKey_diaeresis
-
kOfxKey_copyright
-
kOfxKey_ordfeminine
-
kOfxKey_guillemotleft
-
kOfxKey_notsign
-
kOfxKey_hyphen
-
kOfxKey_registered
-
kOfxKey_macron
-
kOfxKey_degree
-
kOfxKey_plusminus
-
kOfxKey_twosuperior
-
kOfxKey_threesuperior
-
kOfxKey_acute
-
kOfxKey_mu
-
kOfxKey_paragraph
-
kOfxKey_periodcentered
-
kOfxKey_cedilla
-
kOfxKey_onesuperior
-
kOfxKey_masculine
-
kOfxKey_guillemotright
-
kOfxKey_onequarter
-
kOfxKey_onehalf
-
kOfxKey_threequarters
-
kOfxKey_questiondown
-
kOfxKey_Agrave
-
kOfxKey_Aacute
-
kOfxKey_Acircumflex
-
kOfxKey_Atilde
-
kOfxKey_Adiaeresis
-
kOfxKey_Aring
-
kOfxKey_AE
-
kOfxKey_Ccedilla
-
kOfxKey_Egrave
-
kOfxKey_Eacute
-
kOfxKey_Ecircumflex
-
kOfxKey_Ediaeresis
-
kOfxKey_Igrave
-
kOfxKey_Iacute
-
kOfxKey_Icircumflex
-
kOfxKey_Idiaeresis
-
kOfxKey_ETH
-
kOfxKey_Eth
-
kOfxKey_Ntilde
-
kOfxKey_Ograve
-
kOfxKey_Oacute
-
kOfxKey_Ocircumflex
-
kOfxKey_Otilde
-
kOfxKey_Odiaeresis
-
kOfxKey_multiply
-
kOfxKey_Ooblique
-
kOfxKey_Ugrave
-
kOfxKey_Uacute
-
kOfxKey_Ucircumflex
-
kOfxKey_Udiaeresis
-
kOfxKey_Yacute
-
kOfxKey_THORN
-
kOfxKey_ssharp
-
kOfxKey_agrave
-
kOfxKey_aacute
-
kOfxKey_acircumflex
-
kOfxKey_atilde
-
kOfxKey_adiaeresis
-
kOfxKey_aring
-
kOfxKey_ae
-
kOfxKey_ccedilla
-
kOfxKey_egrave
-
kOfxKey_eacute
-
kOfxKey_ecircumflex
-
kOfxKey_ediaeresis
-
kOfxKey_igrave
-
kOfxKey_iacute
-
kOfxKey_icircumflex
-
kOfxKey_idiaeresis
-
kOfxKey_eth
-
kOfxKey_ntilde
-
kOfxKey_ograve
-
kOfxKey_oacute
-
kOfxKey_ocircumflex
-
kOfxKey_otilde
-
kOfxKey_odiaeresis
-
kOfxKey_division
-
kOfxKey_oslash
-
kOfxKey_ugrave
-
kOfxKey_uacute
-
kOfxKey_ucircumflex
-
kOfxKey_udiaeresis
-
kOfxKey_yacute
-
kOfxKey_thorn
-
kOfxKey_ydiaeresis
-
kOfxPropKeySym
- file ofxMemory.h
This file contains the API for general purpose memory allocation from a host.
Defines
-
kOfxMemorySuite
Typedefs
-
typedef struct OfxMemorySuiteV1 OfxMemorySuiteV1
The OFX suite that implements general purpose memory management.
Use this suite for ordinary memory management functions, where you would normally use malloc/free or new/delete on ordinary objects.
For images, you should use the memory allocation functions in the image effect suite, as many hosts have specific image memory pools.
Note
C++ plugin developers will need to redefine new and delete as skins ontop of this suite.
-
kOfxMemorySuite
- file ofxMessage.h
- #include “ofxCore.h”
This file contains the Host API for end user message communication.
Defines
-
kOfxMessageSuite
-
kOfxMessageFatal
String used to type fatal error messages.
Fatal error messages should only be posted by a plugin when it can no longer continue operation.
-
kOfxMessageError
String used to type error messages.
Ordinary error messages should be posted when there is an error in operation that is recoverable by user intervention.
-
kOfxMessageWarning
String used to type warning messages.
Warnings indicate states that allow for operations to proceed, but are not necessarily optimal.
-
kOfxMessageMessage
String used to type simple ordinary messages.
Ordinary messages simply convey information from the plugin directly to the user.
-
kOfxMessageLog
String used to type log messages.
Log messages are written out to a log and not to the end user.
-
kOfxMessageQuestion
String used to type yes/no messages.
The host is to enter a modal state which waits for the user to respond yes or no. The OfxMessageSuiteV1::message function which posted the message will only return after the user responds. When asking a question, the OfxStatus code returned by the message function will be,
kOfxStatReplyYes - if the user replied ‘yes’ to the question
kOfxStatReplyNo - if the user replied ‘no’ to the question
some error code if an error was encounterred
It is an error to post a question message if the plugin is not in an interactive session.
Typedefs
-
typedef struct OfxMessageSuiteV1 OfxMessageSuiteV1
The OFX suite that allows a plug-in to pass messages back to a user. The V2 suite extends on this in a backwards compatible manner.
-
typedef struct OfxMessageSuiteV2 OfxMessageSuiteV2
The OFX suite that allows a plug-in to pass messages back to a user.
This extends OfxMessageSuiteV1, and should be considered a replacement to version 1.
Note that this suite has been extended in backwards compatible manner, so that a host can return this struct for both V1 and V2.
-
kOfxMessageSuite
- file ofxMultiThread.h
- #include “ofxCore.h”
This file contains the Host Suite for threading
Defines
-
kOfxMultiThreadSuite
Typedefs
-
typedef struct OfxMutex *OfxMutexHandle
Mutex blind data handle.
- void() OfxThreadFunctionV1 (unsigned int threadIndex, unsigned int threadMax, void *customArg)
The function type to passed to the multi threading routines.
threadIndex
unique index of this thread, will be between 0 and threadMaxthreadMax
to total number of threads executing this functioncustomArg
the argument passed into multiThread
-
typedef struct OfxMultiThreadSuiteV1 OfxMultiThreadSuiteV1
OFX suite that provides simple SMP style multi-processing.
-
kOfxMultiThreadSuite
- file ofxOld.h
Defines
-
kOfxImageComponentYUVA
String to label images with YUVA components —ofxImageEffects.h.
- Deprecated:
removed in v1.4. Note, this has been deprecated in v1.3
-
kOfxImageEffectPropInAnalysis
Indicates whether an effect is performing an analysis pass. —ofxImageEffects.h.
Type - int X 1
Property Set - plugin instance (read/write)
Default - to 0
Valid Values - This must be one of 0 or 1
- Deprecated:
This feature has been deprecated - officially commented out v1.4.
-
kOfxInteractPropViewportSize
The size of an interact’s openGL viewport — ofxInteract.h.
Type - int X 2
Property Set - read only property on the interact instance and in argument to all the interact actions.
- Deprecated:
V1.3: This property is the redundant and its use will be deprecated in future releases. V1.4: Removed
-
kOfxParamDoubleTypeNormalisedX
value for the kOfxParamPropDoubleType property, indicating a size normalised to the X dimension. See kOfxParamPropDoubleType. — ofxParam.h
- Deprecated:
V1.3: Deprecated in favour of ::OfxParamDoubleTypeX V1.4: Removed
-
kOfxParamDoubleTypeNormalisedY
value for the kOfxParamPropDoubleType property, indicating a size normalised to the Y dimension. See kOfxParamPropDoubleType. — ofxParam.h
- Deprecated:
V1.3: Deprecated in favour of ::OfxParamDoubleTypeY V1.4: Removed
-
kOfxParamDoubleTypeNormalisedXAbsolute
value for the kOfxParamPropDoubleType property, indicating an absolute position normalised to the X dimension. See kOfxParamPropDoubleType. — ofxParam.h
- Deprecated:
V1.3: Deprecated in favour of ::OfxParamDoubleTypeXAbsolute V1.4: Removed
-
kOfxParamDoubleTypeNormalisedYAbsolute
value for the kOfxParamPropDoubleType property, indicating an absolute position normalised to the Y dimension. See kOfxParamPropDoubleType. — ofxParam.h
- Deprecated:
V1.3: Deprecated in favour of ::OfxParamDoubleTypeYAbsolute V1.4: Removed
-
kOfxParamDoubleTypeNormalisedXY
value for the kOfxParamPropDoubleType property, indicating normalisation to the X and Y dimension for 2D params. See kOfxParamPropDoubleType. — ofxParam.h
- Deprecated:
V1.3: Deprecated in favour of ::OfxParamDoubleTypeXY V1.4: Removed
-
kOfxParamDoubleTypeNormalisedXYAbsolute
value for the kOfxParamPropDoubleType property, indicating normalisation to the X and Y dimension for a 2D param that can be interpretted as an absolute spatial position. See kOfxParamPropDoubleType. — ofxParam.h
- Deprecated:
V1.3: Deprecated in favour of kOfxParamDoubleTypeXYAbsolute V1.4: Removed
Typedefs
-
typedef struct OfxYUVAColourB OfxYUVAColourB
Defines an 8 bit per component YUVA pixel — ofxPixels.h Deprecated in 1.3, removed in 1.4.
-
typedef struct OfxYUVAColourS OfxYUVAColourS
Defines an 16 bit per component YUVA pixel — ofxPixels.h.
- Deprecated:
Deprecated in 1.3, removed in 1.4
-
typedef struct OfxYUVAColourF OfxYUVAColourF
Defines an floating point component YUVA pixel — ofxPixels.h.
- Deprecated:
Deprecated in 1.3, removed in 1.4
-
kOfxImageComponentYUVA
- file ofxOpenGLRender.h
Defines
-
_ofxOpenGLRender_h_
-
_ofxOpenGLRender_h_
- file ofxParam.h
- #include “ofxCore.h”#include “ofxProperty.h”
This header contains the suite definition to manipulate host side parameters.
For more details go see ParametersPage
Defines
-
kOfxParameterSuite
string value to the kOfxPropType property for all parameters
-
kOfxTypeParameter
string value on the kOfxPropType property for all parameter definitions (ie: the handle returned in describe)
-
kOfxTypeParameterInstance
string value on the kOfxPropType property for all parameter instances
-
kOfxParamTypeInteger
String to identify a param as a single valued integer.
-
kOfxParamTypeDouble
String to identify a param as a Single valued floating point parameter
-
kOfxParamTypeBoolean
String to identify a param as a Single valued boolean parameter.
-
kOfxParamTypeChoice
String to identify a param as a Single valued, ‘one-of-many’ parameter.
-
kOfxParamTypeStrChoice
String to identify a param as a string-valued ‘one-of-many’ parameter.
- Since
Version 1.5
-
kOfxParamTypeRGBA
String to identify a param as a Red, Green, Blue and Alpha colour parameter.
-
kOfxParamTypeRGB
String to identify a param as a Red, Green and Blue colour parameter.
-
kOfxParamTypeDouble2D
String to identify a param as a Two dimensional floating point parameter.
-
kOfxParamTypeInteger2D
String to identify a param as a Two dimensional integer point parameter.
-
kOfxParamTypeDouble3D
String to identify a param as a Three dimensional floating point parameter.
-
kOfxParamTypeInteger3D
String to identify a param as a Three dimensional integer parameter.
-
kOfxParamTypeString
String to identify a param as a String (UTF8) parameter.
-
kOfxParamTypeCustom
String to identify a param as a Plug-in defined parameter.
-
kOfxParamTypeGroup
String to identify a param as a Grouping parameter.
-
kOfxParamTypePage
String to identify a param as a page parameter.
-
kOfxParamTypePushButton
String to identify a param as a PushButton parameter.
-
kOfxParamHostPropSupportsCustomAnimation
Indicates if the host supports animation of custom parameters.
Type - int X 1
Property Set - host descriptor (read only)
Value Values - 0 or 1
-
kOfxParamHostPropSupportsStringAnimation
Indicates if the host supports animation of string params.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - 0 or 1
-
kOfxParamHostPropSupportsBooleanAnimation
Indicates if the host supports animation of boolean params.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - 0 or 1
-
kOfxParamHostPropSupportsChoiceAnimation
Indicates if the host supports animation of choice params.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - 0 or 1
-
kOfxParamHostPropSupportsCustomInteract
Indicates if the host supports custom interacts for parameters.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - 0 or 1
Currently custom interacts for parameters can only be drawn using OpenGL. APIs will be added later to support using the new Draw Suite.
-
kOfxParamHostPropMaxParameters
Indicates the maximum numbers of parameters available on the host.
Type - int X 1
Property Set - host descriptor (read only)
If set to -1 it implies unlimited number of parameters.
-
kOfxParamHostPropMaxPages
Indicates the maximum number of parameter pages.
Type - int X 1
Property Set - host descriptor (read only)
If there is no limit to the number of pages on a host, set this to -1.
Hosts that do not support paged parameter layout should set this to zero.
-
kOfxParamHostPropPageRowColumnCount
This indicates the number of parameter rows and coloumns on a page.
Type - int X 2
Property Set - host descriptor (read only)
If the host has supports paged parameter layout, used dimension 0 as the number of columns per page and dimension 1 as the number of rows per page.
-
kOfxParamPageSkipRow
Pseudo parameter name used to skip a row in a page layout.
Passed as a value to the kOfxParamPropPageChild property.
See ParametersInterfacesPagedLayouts for more details.
-
kOfxParamPageSkipColumn
Pseudo parameter name used to skip a row in a page layout.
Passed as a value to the kOfxParamPropPageChild property.
See ParametersInterfacesPagedLayouts for more details.
-
kOfxParamPropInteractV1
Overrides the parameter’s standard user interface with the given interact.
Type - pointer X 1
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - NULL
Valid Values - must point to a OfxPluginEntryPoint
If set, the parameter’s normal interface is replaced completely by the interact gui.
Currently custom interacts for parameters can only be drawn using OpenGL. APIs will be added later to support using the new Draw Suite.
-
kOfxParamPropInteractSize
The size of a parameter instance’s custom interface in screen pixels.
Type - double x 2
Property Set - plugin parameter instance (read only)
This is set by a host to indicate the current size of a custom interface if the plug-in has one. If not this is set to (0,0).
-
kOfxParamPropInteractSizeAspect
The preferred aspect ratio of a parameter’s custom interface.
Type - double x 1
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - 1.0
Valid Values - greater than or equal to 0.0
If set to anything other than 0.0, the custom interface for this parameter will be of a size with this aspect ratio (x size/y size).
-
kOfxParamPropInteractMinimumSize
The minimum size of a parameter’s custom interface, in screen pixels.
Type - double x 2
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - 10,10
Valid Values - greater than (0, 0)
Any custom interface will not be less than this size.
-
kOfxParamPropInteractPreferedSize
The preferred size of a parameter’s custom interface.
Type - int x 2
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - 10,10
Valid Values - greater than (0, 0)
A host should attempt to set a parameter’s custom interface on a parameter to be this size if possible, otherwise it will be of kOfxParamPropInteractSizeAspect aspect but larger than kOfxParamPropInteractMinimumSize.
-
kOfxParamPropType
The type of a parameter.
Type - C string X 1
Property Set - plugin parameter descriptor (read only) and instance (read only)
This string will be set to the type that the parameter was create with.
-
kOfxParamPropAnimates
Flags whether a parameter can animate.
Type - int x 1
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - 1
Valid Values - 0 or 1
A plug-in uses this property to indicate if a parameter is able to animate.
-
kOfxParamPropCanUndo
Flags whether changes to a parameter should be put on the undo/redo stack.
Type - int x 1
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - 1
Valid Values - 0 or 1
-
kOfxPropParamSetNeedsSyncing
States whether the plugin needs to resync its private data.
Type - int X 1
Property Set - param set instance (read/write)
Default - 0
Valid Values -
0 - no need to sync
1 - paramset is not synced
The plugin should set this flag to true whenever any internal state has not been flushed to the set of params.
The host will examine this property each time it does a copy or save operation on the instance. If it is set to 1, the host will call SyncPrivateData and then set it to zero before doing the copy/save. If it is set to 0, the host will assume that the param data correctly represents the private state, and will not call SyncPrivateData before copying/saving. If this property is not set, the host will always call SyncPrivateData before copying or saving the effect (as if the property were set to 1 — but the host will not create or modify the property).
-
kOfxParamPropIsAnimating
Flags whether a parameter is currently animating.
Type - int x 1
Property Set - plugin parameter instance (read only)
Valid Values - 0 or 1
Set by a host on a parameter instance to indicate if the parameter has a non-constant value set on it. This can be as a consequence of animation or of scripting modifying the value, or of a parameter being connected to an expression in the host.
-
kOfxParamPropPluginMayWrite
Flags whether the plugin will attempt to set the value of a parameter in some callback or analysis pass.
Type - int x 1
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - 0
Valid Values - 0 or 1
This is used to tell the host whether the plug-in is going to attempt to set the value of the parameter.
- Deprecated:
v1.4: deprecated - to be removed in 1.5
-
kOfxParamPropPersistant
Flags whether the value of a parameter should persist.
Type - int x 1
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - 1
Valid Values - 0 or 1
This is used to tell the host whether the value of the parameter is important and should be save in any description of the plug-in.
-
kOfxParamPropEvaluateOnChange
Flags whether changing a parameter’s value forces an evalution (ie: render),.
Type - int x 1
Property Set - plugin parameter descriptor (read/write) and instance (read/write only)
Default - 1
Valid Values - 0 or 1
This is used to indicate if the value of a parameter has any affect on an effect’s output, eg: the parameter may be purely for GUI purposes, and so changing its value should not trigger a re-render.
-
kOfxParamPropSecret
Flags whether a parameter should be exposed to a user,.
Type - int x 1
Property Set - plugin parameter descriptor (read/write) and instance (read/write)
Default - 0
Valid Values - 0 or 1
If secret, a parameter is not exposed to a user in any interface, but should otherwise behave as a normal parameter.
Secret params are typically used to hide important state detail that would otherwise be unintelligible to a user, for example the result of a statical analysis that might need many parameters to store.
-
kOfxParamPropScriptName
The value to be used as the id of the parameter in a host scripting language.
Type - ASCII C string X 1,
Property Set - plugin parameter descriptor (read/write) and instance (read only),
Default - the unique name the parameter was created with.
Valid Values - ASCII string unique to all parameters in the plug-in.
Many hosts have a scripting language that they use to set values of parameters and more. If so, this is the name of a parameter in such scripts.
-
kOfxParamPropCacheInvalidation
Specifies how modifying the value of a param will affect any output of an effect over time.
Type - C string X 1
Property Set - plugin parameter descriptor (read/write) and instance (read only),
Default - kOfxParamInvalidateValueChange
Valid Values - This must be one of
Imagine an effect with an animating parameter in a host that caches rendered output. Think of the what happens when you add a new key frame. -If the parameter represents something like an absolute position, the cache will only need to be invalidated for the range of frames that keyframe affects.
If the parameter represents something like a speed which is integrated, the cache will be invalidated from the keyframe until the end of the clip.
There are potentially other situations where the entire cache will need to be invalidated (though I can’t think of one off the top of my head).
-
kOfxParamInvalidateValueChange
Used as a value for the kOfxParamPropCacheInvalidation property.
-
kOfxParamInvalidateValueChangeToEnd
Used as a value for the kOfxParamPropCacheInvalidation property.
-
kOfxParamInvalidateAll
Used as a value for the kOfxParamPropCacheInvalidation property.
-
kOfxParamPropHint
A hint to the user as to how the parameter is to be used.
Type - UTF8 C string X 1
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - “”
-
kOfxParamPropDefault
The default value of a parameter.
Type - The type is dependant on the parameter type as is the dimension.
Property Set - plugin parameter descriptor (read/write) and instance (read/write only),
Default - 0 cast to the relevant type (or “” for strings and custom parameters)
The exact type and dimension is dependant on the type of the parameter. These are….
kOfxParamTypeInteger - integer property of one dimension
kOfxParamTypeDouble - double property of one dimension
kOfxParamTypeBoolean - integer property of one dimension
kOfxParamTypeChoice - integer property of one dimension
kOfxParamTypeStrChoice - string property of one dimension
kOfxParamTypeRGBA - double property of four dimensions
kOfxParamTypeRGB - double property of three dimensions
kOfxParamTypeDouble2D - double property of two dimensions
kOfxParamTypeInteger2D - integer property of two dimensions
kOfxParamTypeDouble3D - double property of three dimensions
kOfxParamTypeInteger3D - integer property of three dimensions
kOfxParamTypeString - string property of one dimension
kOfxParamTypeCustom - string property of one dimension
kOfxParamTypeGroup - does not have this property
kOfxParamTypePage - does not have this property
kOfxParamTypePushButton - does not have this property
-
kOfxParamPropDoubleType
Describes how the double parameter should be interpreted by a host.
Type - C string X 1
Default - kOfxParamDoubleTypePlain
Property Set - 1D, 2D and 3D float plugin parameter descriptor (read/write) and instance (read only),
Valid Values -This must be one of
kOfxParamDoubleTypePlain - parameter has no special interpretation,
kOfxParamDoubleTypeAngle - parameter is to be interpretted as an angle,
kOfxParamDoubleTypeScale - parameter is to be interpretted as a scale factor,
kOfxParamDoubleTypeTime - parameter represents a time value (1D only),
kOfxParamDoubleTypeAbsoluteTime - parameter represents an absolute time value (1D only),
kOfxParamDoubleTypeX - size wrt to the project’s X dimension (1D only), in canonical coordinates,
kOfxParamDoubleTypeXAbsolute - absolute position on the X axis (1D only), in canonical coordinates,
kOfxParamDoubleTypeY - size wrt to the project’s Y dimension(1D only), in canonical coordinates,
kOfxParamDoubleTypeYAbsolute - absolute position on the Y axis (1D only), in canonical coordinates,
kOfxParamDoubleTypeXY - size in 2D (2D only), in canonical coordinates,
kOfxParamDoubleTypeXYAbsolute - an absolute position on the image plane, in canonical coordinates.
Double parameters can be interpreted in several different ways, this property tells the host how to do so and thus gives hints as to the interface of the parameter.
-
kOfxParamDoubleTypePlain
value for the kOfxParamPropDoubleType property, indicating the parameter has no special interpretation and should be interpretted as a raw numeric value.
-
kOfxParamDoubleTypeScale
value for the kOfxParamPropDoubleType property, indicating the parameter is to be interpreted as a scale factor. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeAngle
value for the kOfxParamDoubleTypeAngle property, indicating the parameter is to be interpreted as an angle. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeTime
value for the kOfxParamDoubleTypeAngle property, indicating the parameter is to be interpreted as a time. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeAbsoluteTime
value for the kOfxParamDoubleTypeAngle property, indicating the parameter is to be interpreted as an absolute time from the start of the effect. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeX
value for the kOfxParamPropDoubleType property, indicating a size in canonical coords in the X dimension. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeY
value for the kOfxParamPropDoubleType property, indicating a size in canonical coords in the Y dimension. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeXAbsolute
value for the kOfxParamPropDoubleType property, indicating an absolute position in canonical coords in the X dimension. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeYAbsolute
value for the kOfxParamPropDoubleType property, indicating an absolute position in canonical coords in the Y dimension. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeXY
value for the kOfxParamPropDoubleType property, indicating a 2D size in canonical coords. See kOfxParamPropDoubleType.
-
kOfxParamDoubleTypeXYAbsolute
value for the kOfxParamPropDoubleType property, indicating a 2D position in canonical coords. See kOfxParamPropDoubleType.
-
kOfxParamPropDefaultCoordinateSystem
Describes in which coordinate system a spatial double parameter’s default value is specified.
Type - C string X 1
Default - kOfxParamCoordinatesCanonical
Property Set - Non normalised spatial double parameters, ie: any double param who’s kOfxParamPropDoubleType is set to one of…
kOfxParamDoubleTypeX
kOfxParamDoubleTypeXAbsolute
kOfxParamDoubleTypeY
kOfxParamDoubleTypeYAbsolute
kOfxParamDoubleTypeXY
kOfxParamDoubleTypeXYAbsolute
Valid Values - This must be one of
kOfxParamCoordinatesCanonical - the default is in canonical coords
kOfxParamCoordinatesNormalised - the default is in normalised coordinates
This allows a spatial param to specify what its default is, so by saying normalised and “0.5” it would be in the ‘middle’, by saying canonical and 100 it would be at value 100 independent of the size of the image being applied to.
-
kOfxParamCoordinatesCanonical
Define the canonical coordinate system.
-
kOfxParamCoordinatesNormalised
Define the normalised coordinate system.
-
kOfxParamPropHasHostOverlayHandle
A flag to indicate if there is a host overlay UI handle for the given parameter.
Type - int x 1
Property Set - plugin parameter descriptor (read only)
Valid Values - 0 or 1
If set to 1, then the host is flagging that there is some sort of native user overlay interface handle available for the given parameter.
-
kOfxParamPropUseHostOverlayHandle
A flag to indicate that the host should use a native UI overlay handle for the given parameter.
Type - int x 1
Property Set - plugin parameter descriptor (read/write only) and instance (read only)
Default - 0
Valid Values - 0 or 1
If set to 1, then a plugin is flaging to the host that the host should use a native UI overlay handle for the given parameter. A plugin can use this to keep a native look and feel for parameter handles. A plugin can use kOfxParamPropHasHostOverlayHandle to see if handles are available on the given parameter.
-
kOfxParamPropShowTimeMarker
Enables the display of a time marker on the host’s time line to indicate the value of the absolute time param.
Type - int x 1
Property Set - plugin parameter descriptor (read/write) and instance (read/write)
Default - 0
Valid Values - 0 or 1
If a double parameter is has kOfxParamPropDoubleType set to kOfxParamDoubleTypeAbsoluteTime, then this indicates whether any marker should be made visible on the host’s time line.
-
kOfxPluginPropParamPageOrder
Sets the parameter pages and order of pages.
Type - C string X N
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - “”
Valid Values - the names of any page param in the plugin
This property sets the preferred order of parameter pages on a host. If this is never set, the preferred order is the order the parameters were declared in.
-
kOfxParamPropPageChild
The names of the parameters included in a page parameter.
Type - C string X N
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - “”
Valid Values - the names of any parameter that is not a group or page, as well as kOfxParamPageSkipRow and kOfxParamPageSkipColumn
This is a property on parameters of type kOfxParamTypePage, and tells the page what parameters it contains. The parameters are added to the page from the top left, filling in columns as we go. The two pseudo param names kOfxParamPageSkipRow and kOfxParamPageSkipColumn are used to control layout.
Note parameters can appear in more than one page.
-
kOfxParamPropParent
The name of a parameter’s parent group.
Type - C string X 1
Property Set - plugin parameter descriptor (read/write) and instance (read only),
Default - “”, which implies the “root” of the hierarchy,
Valid Values - the name of a parameter with type of kOfxParamTypeGroup
Hosts that have hierarchical layouts of their params use this to recursively group parameter.
By default parameters are added in order of declaration to the ‘root’ hierarchy. This property is used to reparent params to a predefined param of type kOfxParamTypeGroup.
-
kOfxParamPropGroupOpen
Whether the initial state of a group is open or closed in a hierarchical layout.
Type - int X 1
Property Set - plugin parameter descriptor (read/write) and instance (read only)
Default - 1
Valid Values - 0 or 1
This is a property on parameters of type kOfxParamTypeGroup, and tells the group whether it should be open or closed by default.
-
kOfxParamPropEnabled
Used to enable a parameter in the user interface.
Type - int X 1
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - 1
Valid Values - 0 or 1
When set to 0 a user should not be able to modify the value of the parameter. Note that the plug-in itself can still change the value of a disabled parameter.
-
kOfxParamPropDataPtr
A private data pointer that the plug-in can store its own data behind.
Type - pointer X 1
Property Set - plugin parameter instance (read/write),
Default - NULL
This data pointer is unique to each parameter instance, so two instances of the same parameter do not share the same data pointer. Use it to hang any needed private data structures.
-
kOfxParamPropChoiceOption
Set options of a choice parameter.
Type - UTF8 C string X N
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - the property is empty with no options set.
This property contains the set of options that will be presented to a user from a choice parameter. See ParametersChoice for more details.
-
kOfxParamPropChoiceOrder
Set values the host should store for a choice parameter.
Type - int X N
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - Zero-based ordinal list of same length as
OfxParamPropChoiceOption
This property specifies the order in which the options are presented. See “Choice Parameters” for more details. This property is optional; if not set, the host will present the options in their natural order.
This property is useful when changing order of choice param options, or adding new options in the middle, in a new version of the plugin.
Plugin v1: Option = {"OptA", "OptB", "OptC"} Order = {1, 2, 3} Plugin v2: // will be shown as OptA / OptB / NewOpt / OptC Option = {"OptA", "OptB", "OptC", NewOpt"} Order = {1, 2, 4, 3}
Note that this only affects the host UI’s display order; the project still stores the index of the selected option as always. Plugins should never reorder existing options if they desire backward compatibility.
Values may be arbitrary 32-bit integers. Behavior is undefined if the same value occurs twice in the list; plugins should not do that.
- Since
Version 1.5
-
kOfxParamPropChoiceEnum
Set a enumeration string in a StrChoice (string-valued choice) parameter.
Type - UTF8 C string X N
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - the property is empty with no options set.
This property contains the set of enumeration strings stored by the host in the project corresponding to the options that will be presented to a user from a StrChoice parameter. See ParametersChoice for more details.
- Since
Version 1.5
-
kOfxParamHostPropSupportsStrChoiceAnimation
Indicates if the host supports animation of string choice params.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - 0 or 1
- Since
Version 1.5
-
kOfxParamHostPropSupportsStrChoice
Indicates if the host supports the StrChoice param type.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values - 0 or 1
- Since
Version 1.5
-
kOfxParamPropMin
The minimum value for a numeric parameter.
Type - int or double X N
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - the smallest possible value corresponding to the parameter type (eg: INT_MIN for an integer, -DBL_MAX for a double parameter)
Setting this will also reset kOfxParamPropDisplayMin.
-
kOfxParamPropMax
The maximum value for a numeric parameter.
Type - int or double X N
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - the largest possible value corresponding to the parameter type (eg: INT_MAX for an integer, DBL_MAX for a double parameter)
Setting this will also reset :;kOfxParamPropDisplayMax.
-
kOfxParamPropDisplayMin
The minimum value for a numeric parameter on any user interface.
Type - int or double X N
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - the smallest possible value corresponding to the parameter type (eg: INT_MIN for an integer, -DBL_MAX for a double parameter)
If a user interface represents a parameter with a slider or similar, this should be the minumum bound on that slider.
-
kOfxParamPropDisplayMax
The maximum value for a numeric parameter on any user interface.
Type - int or double X N
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - the largest possible value corresponding to the parameter type (eg: INT_MAX for an integer, DBL_MAX for a double parameter)
If a user interface represents a parameter with a slider or similar, this should be the maximum bound on that slider.
-
kOfxParamPropIncrement
The granularity of a slider used to represent a numeric parameter.
Type - double X 1
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - 1
Valid Values - any greater than 0.
This value is always in canonical coordinates for double parameters that are normalised.
-
kOfxParamPropDigits
How many digits after a decimal point to display for a double param in a GUI.
Type - int X 1
Property Set - plugin parameter descriptor (read/write) and instance (read/write),
Default - 2
Valid Values - any greater than 0.
This applies to double params of any dimension.
-
kOfxParamPropDimensionLabel
Label for individual dimensions on a multidimensional numeric parameter.
Type - UTF8 C string X 1
Property Set - plugin parameter descriptor (read/write) and instance (read only),
Default - “x”, “y” and “z”
Valid Values - any
Use this on 2D and 3D double and integer parameters to change the label on an individual dimension in any GUI for that parameter.
-
kOfxParamPropIsAutoKeying
Will a value change on the parameter add automatic keyframes.
Type - int X 1
Property Set - plugin parameter instance (read only),
Valid Values - 0 or 1
This is set by the host simply to indicate the state of the property.
-
kOfxParamPropCustomInterpCallbackV1
A pointer to a custom parameter’s interpolation function.
Type - pointer X 1
Property Set - plugin parameter descriptor (read/write) and instance (read only),
Default - NULL
Valid Values - must point to a OfxCustomParamInterpFuncV1
It is an error not to set this property in a custom parameter during a plugin’s define call if the custom parameter declares itself to be an animating parameter.
-
kOfxParamPropStringMode
Used to indicate the type of a string parameter.
Type - C string X 1
Property Set - plugin string parameter descriptor (read/write) and instance (read only),
Default - kOfxParamStringIsSingleLine
Valid Values - This must be one of the following
-
kOfxParamPropStringFilePathExists
Indicates string parameters of file or directory type need that file to exist already.
Type - int X 1
Property Set - plugin string parameter descriptor (read/write) and instance (read only),
Default - 1
Valid Values - 0 or 1
If set to 0, it implies the user can specify a new file name, not just a pre-existing one.
-
kOfxParamStringIsSingleLine
Used to set a string parameter to be single line, value to be passed to a kOfxParamPropStringMode property.
-
kOfxParamStringIsMultiLine
Used to set a string parameter to be multiple line, value to be passed to a kOfxParamPropStringMode property.
-
kOfxParamStringIsFilePath
Used to set a string parameter to be a file path, value to be passed to a kOfxParamPropStringMode property.
-
kOfxParamStringIsDirectoryPath
Used to set a string parameter to be a directory path, value to be passed to a kOfxParamPropStringMode property.
-
kOfxParamStringIsLabel
Use to set a string parameter to be a simple label, value to be passed to a kOfxParamPropStringMode property
-
kOfxParamStringIsRichTextFormat
String value on the kOfxParamPropStringMode property of a string parameter (added in 1.3)
-
kOfxParamPropCustomValue
Used by interpolating custom parameters to get and set interpolated values.
Type - C string X 1 or 2
This property is on the inArgs property and outArgs property of a OfxCustomParamInterpFuncV1 and in both cases contains the encoded value of a custom parameter. As an inArgs property it will have two values, being the two keyframes to interpolate. As an outArgs property it will have a single value and the plugin should fill this with the encoded interpolated value of the parameter.
-
kOfxParamPropInterpolationTime
Used by interpolating custom parameters to indicate the time a key occurs at.
Type - double X 2
Property Set - inArgs parameter of a OfxCustomParamInterpFuncV1 (read only)
The two values indicate the absolute times the surrounding keyframes occur at. The keyframes are encoded in a kOfxParamPropCustomValue property.
-
kOfxParamPropInterpolationAmount
Property used by OfxCustomParamInterpFuncV1 to indicate the amount of interpolation to perform.
Type - double X 1
Property Set - inArgs parameter of a OfxCustomParamInterpFuncV1 (read only)
Valid Values - from 0 to 1
This property indicates how far between the two kOfxParamPropCustomValue keys to interpolate.
Typedefs
-
typedef struct OfxParamStruct *OfxParamHandle
Blind declaration of an OFX param.
-
typedef struct OfxParamSetStruct *OfxParamSetHandle
Blind declaration of an OFX parameter set.
- OfxStatus() OfxCustomParamInterpFuncV1 (OfxParamSetHandle instance, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs)
Function prototype for custom parameter interpolation callback functions.
instance
the plugin instance that this parameter occurs ininArgs
handle holding the following properties…kOfxPropName - the name of the custom parameter to interpolate
kOfxPropTime - absolute time the interpolation is ocurring at
kOfxParamPropCustomValue - string property that gives the value of the two keyframes to interpolate, in this case 2D
kOfxParamPropInterpolationTime - 2D double property that gives the time of the two keyframes we are interpolating
kOfxParamPropInterpolationAmount - 1D double property indicating how much to interpolate between the two keyframes
outArgs
handle holding the following properties to be setkOfxParamPropCustomValue - the value of the interpolated custom parameter, in this case 1D
The plugin needs to parse the two strings encoding keyframes on either side of the time we need a value for. It should then interpolate a new value for it, encode it into a string and set the kOfxParamPropCustomValue property with this on the outArgs handle.
The interp value is a linear interpolation amount, however his may be derived from a cubic (or other) curve.
-
typedef struct OfxParameterSuiteV1 OfxParameterSuiteV1
The OFX suite used to define and manipulate user visible parameters.
-
kOfxParameterSuite
- file ofxParametricParam.h
- #include “ofxParam.h”
This header file defines the optional OFX extension to define and manipulate parametric parameters.
Defines
-
kOfxParametricParameterSuite
string value to the kOfxPropType property for all parameters
-
kOfxParamTypeParametric
String to identify a param as a single valued integer.
-
kOfxParamPropParametricDimension
The dimension of a parametric param.
Type - int X 1
Property Set - parametric param descriptor (read/write) and instance (read only)
default - 1
Value Values - greater than 0
This indicates the dimension of the parametric param.
-
kOfxParamPropParametricUIColour
The colour of parametric param curve interface in any UI.
Type - double X N
Property Set - parametric param descriptor (read/write) and instance (read only)
default - unset,
Value Values - three values for each dimension (see kOfxParamPropParametricDimension) being interpretted as R, G and B of the colour for each curve drawn in the UI.
This sets the colour of a parametric param curve drawn a host user interface. A colour triple is needed for each dimension of the oparametric param.
If not set, the host should generally draw these in white.
-
kOfxParamPropParametricInteractBackground
Interact entry point to draw the background of a parametric parameter.
Type - pointer X 1
Property Set - plug-in parametric parameter descriptor (read/write) and instance (read only),
Default - NULL, which implies the host should draw its default background.
Defines a pointer to an interact which will be used to draw the background of a parametric parameter’s user interface. None of the pen or keyboard actions can ever be called on the interact.
The openGL transform will be set so that it is an orthographic transform that maps directly to the ‘parametric’ space, so that ‘x’ represents the parametric position and ‘y’ represents the evaluated value.
-
kOfxParamHostPropSupportsParametricAnimation
Property on the host to indicate support for parametric parameter animation.
Type - int X 1
Property Set - host descriptor (read only)
Valid Values
0 indicating the host does not support animation of parmetric params,
1 indicating the host does support animation of parmetric params,
-
kOfxParamPropParametricRange
Property to indicate the min and max range of the parametric input value.
Type - double X 2
Property Set - parameter descriptor (read/write only), and instance (read only)
Default Value - (0, 1)
Valid Values - any pair of numbers so that the first is less than the second.
This controls the min and max values that the parameter will be evaluated at.
Typedefs
-
typedef struct OfxParametricParameterSuiteV1 OfxParametricParameterSuiteV1
The OFX suite used to define and manipulate ‘parametric’ parameters.
This is an optional suite.
Parametric parameters are in effect ‘functions’ a plug-in can ask a host to arbitrarily evaluate for some value ‘x’. A classic use case would be for constructing look-up tables, a plug-in would ask the host to evaluate one at multiple values from 0 to 1 and use that to fill an array.
A host would probably represent this to a user as a cubic curve in a standard curve editor interface, or possibly through scripting. The user would then use this to define the ‘shape’ of the parameter.
The evaluation of such params is not the same as animation, they are returning values based on some arbitrary argument orthogonal to time, so to evaluate such a param, you need to pass a parametric position and time.
Often, you would want such a parametric parameter to be multi-dimensional, for example, a colour look-up table might want three values, one for red, green and blue. Rather than declare three separate parametric parameters, it would be better to have one such parameter with multiple values in it.
The major complication with these parameters is how to allow a plug-in to set values, and defaults. The default default value of a parametric curve is to be an identity lookup. If a plugin wishes to set a different default value for a curve, it can use the suite to set key/value pairs on the descriptor of the param. When a new instance is made, it will have these curve values as a default.
-
kOfxParametricParameterSuite
- file ofxPixels.h
Contains pixel struct definitions
Typedefs
-
typedef struct OfxRGBAColourB OfxRGBAColourB
Defines an 8 bit per component RGBA pixel.
-
typedef struct OfxRGBAColourS OfxRGBAColourS
Defines a 16 bit per component RGBA pixel.
-
typedef struct OfxRGBAColourF OfxRGBAColourF
Defines a floating point component RGBA pixel.
-
typedef struct OfxRGBAColourD OfxRGBAColourD
Defines a double precision floating point component RGBA pixel.
-
typedef struct OfxRGBColourB OfxRGBColourB
Defines an 8 bit per component RGB pixel.
-
typedef struct OfxRGBColourS OfxRGBColourS
Defines a 16 bit per component RGB pixel.
-
typedef struct OfxRGBColourF OfxRGBColourF
Defines a floating point component RGB pixel.
-
typedef struct OfxRGBColourD OfxRGBColourD
Defines a double precision floating point component RGB pixel.
-
typedef struct OfxRGBAColourB OfxRGBAColourB
- file ofxProgress.h
Defines
-
kOfxProgressSuite
suite for displaying a progress bar
Typedefs
-
typedef struct OfxProgressSuiteV1 OfxProgressSuiteV1
A suite that provides progress feedback from a plugin to an application.
A plugin instance can initiate, update and close a progress indicator with this suite.
This is an optional suite in the Image Effect API.
API V1.4: Amends the documentation of progress suite V1 so that it is expected that it can be raised in a modal manner and have a “cancel” button when invoked in instanceChanged. Plugins that perform analysis post an appropriate message, raise the progress monitor in a modal manner and should poll to see if processing has been aborted. Any cancellation should be handled gracefully by the plugin (eg: reset analysis parameters to default values), clear allocated memory…
Many hosts already operate as described above. kOfxStatReplyNo should be returned to the plugin during progressUpdate when the user presses cancel.
Suite V2: Adds an ID that can be looked up for internationalisation and so on. When a new version is introduced, because plug-ins need to support old versions, and plug-in’s new releases are not necessary in synch with hosts (or users don’t immediately update), best practice is to support the 2 suite versions. That is, the plugin should check if V2 exists; if not then check if V1 exists. This way a graceful transition is guaranteed. So plugin should fetchSuite passing 2, (OfxProgressSuiteV2*) fetchSuite(mHost->mHost->host, kOfxProgressSuite,2); and if no success pass (OfxProgressSuiteV1*) fetchSuite(mHost->mHost->host, kOfxProgressSuite,1);
-
typedef struct OfxProgressSuiteV2 OfxProgressSuiteV2
-
kOfxProgressSuite
- file ofxProperty.h
- #include “ofxCore.h”
Contains the API for manipulating generic properties. For more details see PropertiesPage.
Defines
-
kOfxPropertySuite
Typedefs
-
typedef struct OfxPropertySuiteV1 OfxPropertySuiteV1
The OFX suite used to access properties on OFX objects.
-
kOfxPropertySuite
- file ofxTimeLine.h
Defines
-
kOfxTimeLineSuite
Name of the time line suite.
Typedefs
-
typedef struct OfxTimeLineSuiteV1 OfxTimeLineSuiteV1
Suite to control timelines.
This suite is used to enquire and control a timeline associated with a plug-in instance.
This is an optional suite in the Image Effect API.
-
kOfxTimeLineSuite
- group ActionsAll
These are the actions passed to a plug-in’s ‘main’ function
- group PropertiesAll
These strings are used to identify properties within OFX, they are broken up by the host suite or API they relate to.
- group PropertiesGeneral
These properties are general properties and apply to may objects across OFX
- group StatusCodes
These strings are used to identify error states within ofx, they are returned by various host suite functions, as well as plug-in functions. The valid return codes for each function are documented with that function.
- group StatusCodesGeneral
General status codes start at 1 and continue until 999
- group OpenGLRenderSuite
StatusReturnValues
OfxStatus returns indicating that a OpenGL render error has occurred:
If a plug-in returns kOfxStatGLRenderFailed, the host should retry the render with OpenGL rendering disabled.
If a plug-in returns kOfxStatGLOutOfMemory, the host may choose to free resources on the GPU and retry the OpenGL render, rather than immediately falling back to CPU rendering.
-
kOfxStatGPUOutOfMemory
GPU render ran out of memory.
-
kOfxStatGLOutOfMemory
OpenGL render ran out of memory (same as
kOfxStatGPUOutOfMemory
)
-
kOfxStatGPURenderFailed
GPU render failed in a non-memory-related way.
-
kOfxStatGLRenderFailed
OpenGL render failed in a non-memory-related way (same as
kOfxStatGPURenderFailed
)
Defines
-
kOfxOpenGLRenderSuite
The name of the OpenGL render suite, used to fetch from a host via OfxHost::fetchSuite.
-
kOfxImageEffectPropOpenGLRenderSupported
Indicates whether a host or plug-in can support OpenGL accelerated rendering.
Type - C string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only) - plug-in instance change (read/write)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - in which case the host or plug-in does not support OpenGL accelerated rendering
”true” - which means a host or plug-in can support OpenGL accelerated rendering, in the case of plug-ins this also means that it is capable of CPU based rendering in the absence of a GPU
”needed” - only for plug-ins, this means that an plug-in has to have OpenGL support, without which it cannot work.
V1.4: It is now expected from host reporting v1.4 that the plug-in can during instance change switch from true to false and false to true.
-
kOfxOpenGLPropPixelDepth
Indicates the bit depths supported by a plug-in during OpenGL renders.
This is analogous to kOfxImageEffectPropSupportedPixelDepths. When a plug-in sets this property, the host will try to provide buffers/textures in one of the supported formats. Additionally, the target buffers where the plug-in renders to will be set to one of the supported formats.
Unlike kOfxImageEffectPropSupportedPixelDepths, this property is optional. Shader-based effects might not really care about any format specifics when using OpenGL textures, so they can leave this unset and allow the host the decide the format.
Type - string X N
Property Set - plug-in descriptor (read only)
Default - none set
Valid Values - This must be one of
kOfxBitDepthNone (implying a clip is unconnected, not valid for an image)
-
kOfxImageEffectPropOpenGLEnabled
Indicates that a plug-in SHOULD use OpenGL acceleration in the current action.
When a plug-in and host have established they can both use OpenGL renders then when this property has been set the host expects the plug-in to render its result into the buffer it has setup before calling the render. The plug-in can then also safely use the ‘OfxImageEffectOpenGLRenderSuite’
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that the plug-in cannot use the OpenGL suite
1 indicates that the plug-in should render into the texture, and may use the OpenGL suite functions.
v1.4: kOfxImageEffectPropOpenGLEnabled should probably be checked in Instance Changed prior to try to read image via clipLoadTexture
Note
Once this property is set, the host and plug-in have agreed to use OpenGL, so the effect SHOULD access all its images through the OpenGL suite.
-
kOfxImageEffectPropOpenGLTextureIndex
Indicates the texture index of an image turned into an OpenGL texture by the host.
Type - int X 1
Property Set - texture handle returned by ` OfxImageEffectOpenGLRenderSuiteV1::clipLoadTexture (read only)
The property set of the following actions should contain this property:This value should be cast to a GLuint and used as the texture index when performing OpenGL texture operations.
-
kOfxImageEffectPropOpenGLTextureTarget
Indicates the texture target enumerator of an image turned into an OpenGL texture by the host.
Type - int X 1
Property Set - texture handle returned by OfxImageEffectOpenGLRenderSuiteV1::clipLoadTexture (read only) This value should be cast to a GLenum and used as the texture target when performing OpenGL texture operations.
The property set of the following actions should contain this property:
-
kOfxActionOpenGLContextAttached
Action called when an effect has just been attached to an OpenGL context.
The purpose of this action is to allow a plug-in to set up any data it may need to do OpenGL rendering in an instance. For example…
allocate a lookup table on a GPU,
create an OpenCL or CUDA context that is bound to the host’s OpenGL context so it can share buffers.
The plug-in will be responsible for deallocating any such shared resource in the kOfxActionOpenGLContextDetached action.
A host cannot call kOfxActionOpenGLContextAttached on the same instance without an intervening kOfxActionOpenGLContextDetached. A host can have a plug-in swap OpenGL contexts by issuing a attach/detach for the first context then another attach for the next context.
The arguments to the action are…
handle
handle to the plug-in instance, cast to an OfxImageEffectHandleinArgs
is redundant and set to NULLoutArgs
is redundant and set to NULL
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored, but all was well anyway
kOfxStatErrMemory, in which case this may be called again after a memory purge
kOfxStatFailed, something went wrong, but no error code appropriate, the plug-in should to post a message if possible and the host should not attempt to run the plug-in in OpenGL render mode.
-
kOfxActionOpenGLContextDetached
Action called when an effect is about to be detached from an OpenGL context.
The purpose of this action is to allow a plug-in to deallocate any resource allocated in kOfxActionOpenGLContextAttached just before the host decouples a plug-in from an OpenGL context. The host must call this with the same OpenGL context active as it called with the corresponding kOfxActionOpenGLContextAttached.
The arguments to the action are…
handle
handle to the plug-in instance, cast to an OfxImageEffectHandleinArgs
is redundant and set to NULLoutArgs
is redundant and set to NULL
kOfxStatOK, the action was trapped and all was well
kOfxStatReplyDefault, the action was ignored, but all was well anyway
kOfxStatErrMemory, in which case this may be called again after a memory purge
kOfxStatFailed, something went wrong, but no error code appropriate, the plug-in should to post a message if possible and the host should not attempt to run the plug-in in OpenGL render mode.
Typedefs
-
typedef struct OfxImageEffectOpenGLRenderSuiteV1 OfxImageEffectOpenGLRenderSuiteV1
OFX suite that provides image to texture conversion for OpenGL processing.
- group CudaRender
- Version
CUDA rendering was added in version 1.5.
Defines
-
kOfxImageEffectPropCudaRenderSupported
Indicates whether a host or plug-in can support CUDA render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - the host or plug-in does not support CUDA render
”true” - the host or plug-in can support CUDA render
-
kOfxImageEffectPropCudaEnabled
Indicates that a plug-in SHOULD use CUDA render in the current action.
If a plug-in and host have both set kOfxImageEffectPropCudaRenderSupported=”true” then the host MAY set this property to indicate that it is passing images as CUDA memory pointers.
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that the kOfxImagePropData of each image of each clip is a CPU memory pointer.
1 indicates that the kOfxImagePropData of each image of each clip is a CUDA memory pointer.
-
kOfxImageEffectPropCudaStreamSupported
Indicates whether a host or plug-in can support CUDA streams.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - in which case the host or plug-in does not support CUDA streams
”true” - which means a host or plug-in can support CUDA streams
-
kOfxImageEffectPropCudaStream
The CUDA stream to be used for rendering.
Type - pointer X 1
Property Set - inArgs property set of the following actions…
This property will only be set if the host and plug-in both support CUDA streams.
If set:
this property contains a pointer to the stream of CUDA render (cudaStream_t). In order to use it, reinterpret_cast<cudaStream_t>(pointer) is needed.
the plug-in SHOULD ensure that its render action enqueues any asynchronous CUDA operations onto the supplied queue.
the plug-in SHOULD NOT wait for final asynchronous operations to complete before returning from the render action, and SHOULD NOT call cudaDeviceSynchronize() at any time.
If not set:
the plug-in SHOULD ensure that any asynchronous operations it enqueues have completed before returning from the render action.
- group MetalRender
- Version
Metal rendering was added in version 1.5.
Defines
-
kOfxImageEffectPropMetalRenderSupported
Indicates whether a host or plug-in can support Metal render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - the host or plug-in does not support Metal render
”true” - the host or plug-in can support Metal render
-
kOfxImageEffectPropMetalEnabled
Indicates that a plug-in SHOULD use Metal render in the current action.
If a plug-in and host have both set kOfxImageEffectPropMetalRenderSupported=”true” then the host MAY set this property to indicate that it is passing images as Metal buffers.
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that the kOfxImagePropData of each image of each clip is a CPU memory pointer.
1 indicates that the kOfxImagePropData of each image of each clip is a Metal id<MTLBuffer>.
-
kOfxImageEffectPropMetalCommandQueue
The command queue of Metal render.
Type - pointer X 1
Property Set - inArgs property set of the following actions…
This property contains a pointer to the command queue to be used for Metal rendering (id<MTLCommandQueue>). In order to use it, reinterpret_cast<id<MTLCommandQueue>>(pointer) is needed.
The plug-in SHOULD ensure that its render action enqueues any asynchronous Metal operations onto the supplied queue.
The plug-in SHOULD NOT wait for final asynchronous operations to complete before returning from the render action.
- group OpenClRender
- Version
OpenCL rendering was added in version 1.5.
Defines
-
kOfxImageEffectPropOpenCLRenderSupported
Indicates whether a host or plug-in can support OpenCL Buffers render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - the host or plug-in does not support OpenCL Buffers render
”true” - the host or plug-in can support OpenCL Buffers render
-
kOfxImageEffectPropOpenCLSupported
Indicates whether a host or plug-in can support OpenCL Images render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - in which case the host or plug-in does not support OpenCL Images render
”true” - which means a host or plug-in can support OpenCL Images render
-
kOfxImageEffectPropOpenCLEnabled
Indicates that a plug-in SHOULD use OpenCL render in the current action.
If a plug-in and host have both set kOfxImageEffectPropOpenCLRenderSupported=”true” or have both set kOfxImageEffectPropOpenCLSupported=”true” then the host MAY set this property to indicate that it is passing images as OpenCL Buffers or Images.
When rendering using OpenCL Buffers, the cl_mem of the buffers are retrieved using kOfxImagePropData. When rendering using OpenCL Images, the cl_mem of the images are retrieved using kOfxImageEffectPropOpenCLImage. If both kOfxImageEffectPropOpenCLSupported (Buffers) and kOfxImageEffectPropOpenCLRenderSupported (Images) are enabled by the plug-in, it should use kOfxImageEffectPropOpenCLImage to determine which is being used by the host.
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that a plug-in SHOULD use OpenCL render in the render action
1 indicates that a plug-in SHOULD NOT use OpenCL render in the render action
-
kOfxImageEffectPropOpenCLCommandQueue
Indicates the OpenCL command queue that should be used for rendering.
Type - pointer X 1
Property Set - inArgs property set of the following actions…
This property contains a pointer to the command queue to be used for OpenCL rendering (cl_command_queue). In order to use it, reinterpret_cast<cl_command_queue>(pointer) is needed.
The plug-in SHOULD ensure that its render action enqueues any asynchronous OpenCL operations onto the supplied queue.
The plug-in SHOULD NOT wait for final asynchronous operations to complete before returning from the render action.
-
kOfxImageEffectPropOpenCLImage
Indicates the image handle of an image supplied as an OpenCL Image by the host.
Type - pointer X 1
Property Set - image handle returned by clipGetImage
This value should be cast to a cl_mem and used as the image handle when performing OpenCL Images operations. The property should be used (not kOfxImagePropData) when rendering with OpenCL Images (kOfxImageEffectPropOpenCLSupported), and should be used to determine whether Images or Buffers should be used if a plug-in supports both kOfxImageEffectPropOpenCLSupported and kOfxImageEffectPropOpenCLRenderSupported. Note: the kOfxImagePropRowBytes property is not required to be set by the host, since OpenCL Images do not have the concept of row bytes.
-
kOfxOpenCLProgramSuite
Typedefs
-
typedef struct OfxOpenCLProgramSuiteV1 OfxOpenCLProgramSuiteV1
OFX suite that allows a plug-in to get OpenCL programs compiled.
This is an optional suite the host can provide for building OpenCL programs for the plug-in, as an alternative to calling clCreateProgramWithSource / clBuildProgram. There are two advantages to doing this: The host can add flags (such as -cl-denorms-are-zero) to the build call, and may also cache program binaries for performance (however, if the source of the program or the OpenCL environment changes, the host must recompile so some mechanism such as hashing must be used).
- group ImageEffectActions
These are the list of actions passed to an image effect plugin’s main function. For more details on how to deal with actions, see Image Effect Actions.
- group ImageEffectPropDefines
These are the list of properties used by the Image Effects API.
- group StatusCodesImageEffect
These are status codes returned by functions in the OfxImageEffectSuite and Image Effect plugin functions.
They range from 1000 until 1999
- group PropertiesInteract
These are the list of properties used by the Interact API documented in CustomInteractionPage.
- group InteractActions
These are the list of actions passed to an interact’s entry point function. For more details on how to deal with actions, see Interact Actions.
- group KeySyms
These keysymbols are used as values by the kOfxPropKeySym property to indicate the value of a key that has been pressed. A corresponding kOfxPropKeyString property is also set to contain the unicode value of the key (if it has one).
The special keysym kOfxKey_Unknown is used to set the kOfxPropKeySym property in cases where the key has a UTF8 value which is not supported by the symbols below.
- group ParamTypeDefines
These strings are used to identify the type of the parameter when it is defined, they are also on the kOfxParamPropType in any parameter instance.
- group ParamPropDefines
These are the list of properties used by the parameters suite.
- group ErrorCodes
- page ofxOpenGLRender
Introduction
The OfxOpenGLRenderSuite allows image effects to use OpenGL commands (hopefully backed by a GPU) to accelerate rendering of their outputs. The basic scheme is simple….
An effect indicates it wants to use OpenGL acceleration by setting the kOfxImageEffectPropOpenGLRenderSupported flag on its descriptor
A host indicates it supports OpenGL acceleration by setting kOfxImageEffectPropOpenGLRenderSupported on its descriptor
In an effect’s kOfxImageEffectActionGetClipPreferences action, an effect indicates what clips it will be loading images from onto the GPU’s memory during an effect’s kOfxImageEffectActionRender action.
OpenGL House Keeping
If a host supports OpenGL rendering then it flags this with the string property kOfxImageEffectPropOpenGLRenderSupported on its descriptor property set. Effects that cannot run without OpenGL support should examine this in kOfxActionDescribe action and return a kOfxStatErrMissingHostFeature status flag if it is not set to “true”.
Effects flag to a host that they support OpenGL rendering by setting the string property kOfxImageEffectPropOpenGLRenderSupported on their effect descriptor during the kOfxActionDescribe action. Effects can work in three ways….
purely on CPUs without any OpenGL support at all, in which case they should set kOfxImageEffectPropOpenGLRenderSupported to be “false” (the default),
on CPUs but with optional OpenGL support, in which case they should set kOfxImageEffectPropOpenGLRenderSupported to be “true”,
only with OpenGL support, in which case they should set kOfxImageEffectPropOpenGLRenderSupported to be “needed”.
Hosts can examine this flag and respond to it appropriately.
Effects can use OpenGL accelerated rendering during the following action…
If an effect has indicated that it optionally supports OpenGL acceleration, it should check the property kOfxImageEffectPropOpenGLEnabled passed as an in argument to the following actions,
If this property is set to 0, then it should not attempt to use any calls to the OpenGL suite or OpenGL calls whilst rendering.
Getting Images as Textures
An effect could fetch an image into memory from a host via the standard Image Effect suite “clipGetImage” call, then create an OpenGL texture from that. However as several buffer copies and various other bits of house keeping may need to happen to do this, it is more efficient for a host to create the texture directly.
The OfxOpenGLRenderSuiteV1::clipLoadTexture function does this. The arguments and semantics are similar to the OfxImageEffectSuiteV2::clipGetImage function, with a few minor changes.
The effect is passed back a property handle describing the texture. Once the texture is finished with, this should be disposed of via the OfxOpenGLRenderSuiteV1::clipFreeTexture function, which will also delete the associated OpenGL texture (for source clips).
The returned handle has a set of properties on it, analogous to the properties returned on the image handle by OfxImageEffectSuiteV2::clipGetImage. These are:
The main difference between this and an image handle is that the kOfxImagePropData property is replaced by the kOfxImageEffectPropOpenGLTextureIndex property. This integer property should be cast to a GLuint and is the index to use for the OpenGL texture. Next to texture handle the texture target enumerator is given in kOfxImageEffectPropOpenGLTextureTarget
Note, because the image is being directly loaded into a texture by the host it need not obey the Clip Preferences action to remap the image to the pixel depth the effect requested.
Render Output Directly with OpenGL
Effects can use the graphics context as they see fit. They may be doing several render passes with fetch back from the card to main memory via ‘render to texture’ mechanisms interleaved with passes performed on the CPU. The effect must leave output on the graphics card in the provided output image texture buffer.
The host will create a default OpenGL viewport that is the size of the render window passed to the render action. The following code snippet shows how the viewport should be rooted at the bottom left of the output texture.
// set up the OpenGL context for the render to texture ... // figure the size of the render window int dx = renderWindow.x2 - renderWindow.x1; int dy = renderWindow.y2 - renderWindow.y2; // setup the output viewport glViewport(0, 0, dx, dy);
Prior to calling the render action the host may also choose to bind the output texture as the current color buffer (render target), or they may defer doing this until clipLoadTexture is called for the output clip.
After this, it is completely up to the effect to choose what OpenGL operations to render with, including projections and so on.
OpenGL Current Context
The host is only required to make the OpenGL context current (e.g., using wglMakeCurrent, for Windows) during the following actions:
For the first 3 actions, Render through EndSequenceRender, the host is only required to set the OpenGL context if kOfxImageEffectPropOpenGLEnabled is set. In other words, a plug-in should not expect the OpenGL context to be current for other OFX calls, such as kOfxImageEffectActionDescribeInContext.
- page ofxOpenCLRender
Introduction
The OpenCL extension enables plug-ins to use OpenCL commands (typically backed by a GPU) to accelerate rendering of their outputs. The basic scheme is simple….
an plug-in indicates it wants to use OpenCL acceleration by setting the kOfxImageEffectPropOpenCLSupported (Images) and/or kOfxImageEffectPropOpenCLRenderSupported (Buffers) flags on it’s descriptor.
a host indicates it supports OpenCL acceleration by setting kOfxImageEffectPropOpenCLSupported (Images) and/or kOfxImageEffectPropOpenCLRenderSupported (Buffers) on it’s descriptor.
the host decides when to use OpenCL, and sets the kOfxImageEffectPropOpenCLEnabled property on the BeginRender/Render/EndRender calls to indicate this.
when OpenCL Images are being used (kOfxImageEffectPropOpenCLSupported) the clip image property kOfxImageEffectPropOpenCLImage will be set and non-null.
when OpenCL Buffers are being used (kOfxImageEffectPropOpenCLRenderSupported) the clip image property kOfxImagePropData will be set and non-null.
Discovery and Enabling
If a host supports OpenCL rendering then it flags with the string property kOfxImageEffectPropOpenCLSupported (Images) and/or kOfxImageEffectPropOpenCLRenderSupported (Buffers) on its descriptor property set. Effects that cannot run without OpenCL support should examine this in kOfxActionDescribe action and return a kOfxStatErrMissingHostFeature status flag if it is not set to “true”.
Effects flag to a host that they support OpenCL rendering by setting the string property kOfxImageEffectPropOpenCLSupported (Images) and/or kOfxImageEffectPropOpenCLRenderSupported (Buffers) on their effect descriptor during the kOfxActionDescribe action. Effects can work in two ways….
purely on CPUs without any OpenCL support at all, in which case they should set kOfxImageEffectPropOpenCLSupported (Images) and kOfxImageEffectPropOpenCLRenderSupported (Buffers) to be “false” (the default),
on CPUs but with optional OpenCL support, in which case they should set kOfxImageEffectPropOpenCLSupported (Images) and/or kOfxImageEffectPropOpenCLRenderSupported (Buffers) to be “true”
Host may support just OpenCL Images, just OpenCL Buffers, or both, as indicated by which of these two properties they set “true”. Likewise plug-ins may support just OpenCL Images, just OpenCL Buffers, or both, as indicated by which of these two properties they set “true”. If both host and plug-in support both, it is up to the host which it uses. Typically, it will be based on what it uses natively (to avoid an extra copy operation). If a plug-in supports both, it must use kOfxImageEffectPropOpenCLImage to determine if Images or Buffers are being used for a given render action.
Effects can use OpenCL render only during the following action:
If a plug-in has indicated that it optionally supports OpenCL acceleration, it should check the property kOfxImageEffectPropOpenCLEnabled passed as an in argument to the following actions,
If this property is set to 0, then it must not attempt to use OpenCL while rendering. If this property is set to 1, then it must use OpenCL buffers or images while rendering.
If a call using OpenCL rendering fails, the host may re-attempt using CPU buffers instead, but this is not required, and might not be efficient.
OpenCL platform and device versions and feature support
Assume an in-order command queue. Do not assume a profiling command queue.
Effects should target OpenCL 1.1 API and OpenCL C kernel language support. Only minimum required features required in OpenCL 1.1 should be used (for example, see “5.3.2.1 Minimum List of Supported Image Formats” for the list of image types which can be expected to be supported across all devices). If you have specific requirements for features beyond these minimums, you will need to check the device (e.g., using clGetDeviceInfo with CL_DEVICE_EXTENSIONS) to see if your feature is available, and have a fallback if it’s not.
Temporary buffers and images should not be kept past the render action. A separate extension for host managed caching is in the works.
Do not retain OpenCL objects without a matching release within the render action.
Multiple OpenCL Devices
This is very important: The host may support multiple OpenCL devices. Therefore the plug-in should keep a separate set of kernels per OpenCL content (e.g., using a map). The OpenCL context can be found from the command queue using clGetCommandQueueInfo with CL_QUEUE_CONTEXT. Failure to do this will cause crashes or incorrect results when the host switches to another OpenCL device.
- page deprecated
- Member kOfxImageComponentYUVA
- removed in v1.4. Note, this has been deprecated in v1.3
- Member kOfxImageEffectPropInAnalysis
- This feature has been deprecated - officially commented out v1.4.
- Member kOfxInteractPropViewportSize
- V1.3: This property is the redundant and its use will be deprecated in future releases. V1.4: Removed
- Member kOfxParamDoubleTypeNormalisedX
- V1.3: Deprecated in favour of ::OfxParamDoubleTypeX V1.4: Removed
- Member kOfxParamDoubleTypeNormalisedXAbsolute
- V1.3: Deprecated in favour of ::OfxParamDoubleTypeXAbsolute V1.4: Removed
- Member kOfxParamDoubleTypeNormalisedXY
- V1.3: Deprecated in favour of ::OfxParamDoubleTypeXY V1.4: Removed
- Member kOfxParamDoubleTypeNormalisedXYAbsolute
- V1.3: Deprecated in favour of kOfxParamDoubleTypeXYAbsolute V1.4: Removed
- Member kOfxParamDoubleTypeNormalisedY
- V1.3: Deprecated in favour of ::OfxParamDoubleTypeY V1.4: Removed
- Member kOfxParamDoubleTypeNormalisedYAbsolute
- V1.3: Deprecated in favour of ::OfxParamDoubleTypeYAbsolute V1.4: Removed
- Member kOfxParamPropPluginMayWrite
- v1.4: deprecated - to be removed in 1.5
- Member OfxYUVAColourF
- Deprecated in 1.3, removed in 1.4
- Member OfxYUVAColourS
- Deprecated in 1.3, removed in 1.4
- page index
This page represents the automatically extracted HTML documentation of the source headers for the OFX Image Effect API. The documentation was extracted by doxygen (http://www.doxygen.org). A more complete reference manual is https://openfx.readthedocs.io .