Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions include/ofxCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,33 @@ These are the actions passed to a plug-in's 'main' function
*/
#define kOfxActionEndInstanceEdit "OfxActionEndInstanceEdit"

/** @brief

This is called when the effect has been imported from another host. It
is there so that effects can conform their parameters, accounting for
differences in parameter semantics between hosts. Plug-ins should use
\ref kOfxPropAka to inform hosts if their parameters have different names
in other APIs.

@param handle handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL

\pre
- \ref kOfxActionCreateInstance has been called on the instance handle.

\post
- the instance will match the source host as closely as possible.

@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatReplyDefault, the action was ignored
- \ref kOfxStatErrFatal,
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message
*/
#define kOfxActionConform "OfxActionConform"

/*@}*/

/** @brief Returns the 'nth' plug-in implemented inside a binary
Expand Down Expand Up @@ -669,6 +696,24 @@ This property is used to label objects uniquely amoung objects of that type. It
*/
#define kOfxPropName "OfxPropName"

/** @brief Alternative names for an object.

- Type - string X N
- Property Set - on many objects (descriptors and instances), see \ref PropertiesByObject (read only)

This property is used to provide alternative names for objects. It can be used in any situation where ::kOfxPropName is used, and is helpful for situations where the effects are being transferred from another plug-in API.
*/
#define kOfxPropAka "OfxPropAka"

/** @brief Alternative names for parameter dimensions.

- Type - string X N X M
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is, I assume, for the case where the OFX plugin uses a single parameter with a 2D param type, but one foreign host uses (e.g.) TranslateX and TranslateY and another uses tx and ty. How do you store those mappings in a 1D string array property? What does "string X N X M" mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was imagining this as if it was a 2D array, but of course that would require knowing the number of names per dimension, which there is no way to specify as it stands. We could assume the same number of names per dimension, but that breaks in the case of mapping something like an RGB foreign param into an RGBA OFX param.

An alternative is to split the property so that we have kOfxPropAka0, kOfxPropAka1, etc. which will probably be easier to work with.

Another way to do this would be extend properties to support 2D arrays natively, but it seems excessive for this proposal so I'll go with the numbered properties.

- Property Set - multidimensional parameter descriptors, see \ref PropertiesByObject (read only)

This property is used to provide alternative names for each dimension of a multidimensional parameter. It can be used in situations where effects are being transferred from another plug-in API that doesn't support multidimensional parameters, and each dimension was stored as a separate parameter.
*/
#define kOfxPropAka2D "OfxPropAka2D"

/** @brief Identifies a specific version of a host or plugin.

- Type - int X N
Expand Down
Loading