From a327b0548a5ef920e7204e7c5ac85b214f193df8 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Thu, 18 Sep 2025 09:58:58 +0100 Subject: [PATCH 1/3] Alternative names for any object A host may be creating an effect instance based on information imported from another host which uses a different plug-in API. In this case, effects and parameters might have different names. This property allows a plug-in to specify alternative names for any object such as effects and parameters. Signed-off-by: John-Paul Smith --- include/ofxCore.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/ofxCore.h b/include/ofxCore.h index 772826ef..4ef27d2e 100644 --- a/include/ofxCore.h +++ b/include/ofxCore.h @@ -669,6 +669,15 @@ 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 Identifies a specific version of a host or plugin. - Type - int X N From e6ade81e621a4316fdbb65f264d3ce1e7e8b1762 Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Thu, 18 Sep 2025 10:17:08 +0100 Subject: [PATCH 2/3] Conform action This new action allows plug-ins to conform their parameters to match a project imported from a non-OpenFX host. Signed-off-by: John-Paul Smith --- include/ofxCore.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/ofxCore.h b/include/ofxCore.h index 4ef27d2e..5bbc1ab6 100644 --- a/include/ofxCore.h +++ b/include/ofxCore.h @@ -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 From b56e6e537ec26d97e587125f91cde7005b1f900c Mon Sep 17 00:00:00 2001 From: John-Paul Smith Date: Thu, 25 Sep 2025 13:55:43 +0100 Subject: [PATCH 3/3] Alternative names for multidimensional params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some foreign APIs don’t support multidimensional parameters. Plug-ins can set kOfxPropAka2D to provide alternative names for each dimenesion of a parameter, allowing the host to map them correctly. Signed-off-by: John-Paul Smith --- include/ofxCore.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/ofxCore.h b/include/ofxCore.h index 5bbc1ab6..7e056dd2 100644 --- a/include/ofxCore.h +++ b/include/ofxCore.h @@ -705,6 +705,15 @@ This property is used to provide alternative names for objects. It can be used i */ #define kOfxPropAka "OfxPropAka" +/** @brief Alternative names for parameter dimensions. + + - Type - string X N X M + - 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