diff --git a/Documentation/sources/Reference/ofxPropertiesReferenceGenerated.rst b/Documentation/sources/Reference/ofxPropertiesReferenceGenerated.rst index de6efd31..7db00f3a 100644 --- a/Documentation/sources/Reference/ofxPropertiesReferenceGenerated.rst +++ b/Documentation/sources/Reference/ofxPropertiesReferenceGenerated.rst @@ -1054,6 +1054,19 @@ Enumeration Properties - ``OfxImageEffectRenderFullySafe`` - **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPluginRenderThreadSafety`. +.. _prop_OfxImageEffectPropBehaviourWhenUnlicensed: + +**OfxImageEffectPropBehaviourWhenUnlicensed** +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- **C #define**: :c:macro:`kOfxImageEffectPropBehaviourWhenUnlicensed` +- **Type**: enum +- **Dimension**: 1 +- **Valid Values**: + - ``OfxUnlicensedContinue`` + - ``OfxUnlicensedFail`` +- **Doc**: For detailed doc, see :c:macro:`kOfxImageEffectPropBehaviourWhenUnlicensed`. + .. _prop_OfxImageEffectPropCPURenderSupported: **OfxImageEffectPropCPURenderSupported** diff --git a/Documentation/sources/Reference/ofxPropertySetsGenerated.rst b/Documentation/sources/Reference/ofxPropertySetsGenerated.rst index 08e50492..b87e3976 100644 --- a/Documentation/sources/Reference/ofxPropertySetsGenerated.rst +++ b/Documentation/sources/Reference/ofxPropertySetsGenerated.rst @@ -818,6 +818,10 @@ For each action, the required input properties (passed from host to plugin) and **Input Arguments** +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (:c:macro:`kOfxPropName`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) + - :ref:`OfxParamPropCustomValue ` - Type: string, Dimension: 2 (:c:macro:`kOfxParamPropCustomValue`) - :ref:`OfxParamPropInterpolationTime ` - Type: double, Dimension: 2 (:c:macro:`kOfxParamPropInterpolationTime`) @@ -981,12 +985,12 @@ For each action, the required input properties (passed from host to plugin) and - :ref:`OfxImageEffectPropOpenGLTextureTarget ` - Type: int, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLTextureTarget`) -- :ref:`OfxImageEffectPropInteractiveRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropInteractiveRenderStatus`) - - :ref:`OfxImageEffectPropNoSpatialAwareness ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropNoSpatialAwareness`) - :ref:`OfxImageEffectPropThumbnailRender ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropThumbnailRender`) +- :ref:`OfxImageEffectPropBehaviourWhenUnlicensed ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropBehaviourWhenUnlicensed`) + .. _action_OfxImageEffectActionDescribeInContext: **OfxImageEffectActionDescribeInContext** @@ -1045,8 +1049,6 @@ For each action, the required input properties (passed from host to plugin) and - :ref:`OfxImageEffectPropOpenGLTextureTarget ` - Type: int, Dimension: 1 (:c:macro:`kOfxImageEffectPropOpenGLTextureTarget`) -- :ref:`OfxImageEffectPropInteractiveRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropInteractiveRenderStatus`) - .. _action_OfxImageEffectActionGetClipPreferences: **OfxImageEffectActionGetClipPreferences** @@ -1075,10 +1077,6 @@ For each action, the required input properties (passed from host to plugin) and - :ref:`OfxImageEffectPropThumbnailRender ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropThumbnailRender`) -**Output Arguments** - -- :ref:`OfxImageEffectPropFrameRange ` - Type: double, Dimension: 2 (doc: :c:macro:`kOfxImageEffectPropFrameRange`) - .. _action_OfxImageEffectActionGetOutputColourspace: **OfxImageEffectActionGetOutputColourspace** @@ -1150,6 +1148,12 @@ For each action, the required input properties (passed from host to plugin) and - :ref:`OfxImageEffectPropThumbnailRender ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropThumbnailRender`) +**Output Arguments** + +- :ref:`OfxPropName ` - Type: string, Dimension: 1 (doc: :c:macro:`kOfxPropName`) + +- :ref:`OfxPropTime ` - Type: double, Dimension: 1 (doc: :c:macro:`kOfxPropTime`) + .. _action_OfxImageEffectActionRender: **OfxImageEffectActionRender** @@ -1159,6 +1163,12 @@ For each action, the required input properties (passed from host to plugin) and - :ref:`OfxPropTime ` - Type: double, Dimension: 1 (:c:macro:`kOfxPropTime`) +- :ref:`OfxImageEffectPropFieldToRender ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropFieldToRender`) + +- :ref:`OfxImageEffectPropRenderWindow ` - Type: int, Dimension: 4 (:c:macro:`kOfxImageEffectPropRenderWindow`) + +- :ref:`OfxImageEffectPropRenderScale ` - Type: double, Dimension: 2 (:c:macro:`kOfxImageEffectPropRenderScale`) + - :ref:`OfxImageEffectPropSequentialRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropSequentialRenderStatus`) - :ref:`OfxImageEffectPropInteractiveRenderStatus ` - Type: bool, Dimension: 1 (:c:macro:`kOfxImageEffectPropInteractiveRenderStatus`) @@ -1199,6 +1209,8 @@ For each action, the required input properties (passed from host to plugin) and - :ref:`OfxImageEffectPropThumbnailRender ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropThumbnailRender`) +- :ref:`OfxImageEffectPropBehaviourWhenUnlicensed ` - Type: enum, Dimension: 1 (:c:macro:`kOfxImageEffectPropBehaviourWhenUnlicensed`) + .. _action_OfxInteractActionDraw: **OfxInteractActionDraw** diff --git a/include/ofxCore.h b/include/ofxCore.h index 119d4d49..9d2c8895 100644 --- a/include/ofxCore.h +++ b/include/ofxCore.h @@ -552,7 +552,7 @@ These are the actions passed to a plug-in's 'main' function inArgs: - OfxPropChangeReason - OfxImageEffectPropThumbnailRender - outArgs: [] + outArgs: */ #define kOfxActionBeginInstanceChanged "OfxActionBeginInstanceChanged" diff --git a/include/ofxImageEffect.h b/include/ofxImageEffect.h index 8f5d1ccb..77d03eb8 100644 --- a/include/ofxImageEffect.h +++ b/include/ofxImageEffect.h @@ -308,7 +308,7 @@ These are the list of actions passed to an image effect plugin's main function. - OfxPropTime - OfxImageEffectPropThumbnailRender outArgs: - - OfxImageEffectPropFrameRange + # - OfxImageEffectPropFrameRange_ # with clip name */ #define kOfxImageEffectActionGetFramesNeeded "OfxImageEffectActionGetFramesNeeded" @@ -442,6 +442,8 @@ These are the list of actions passed to an image effect plugin's main function. - OfxImageEffectPropRenderScale - OfxImageEffectPropThumbnailRender outArgs: + - OfxPropName + - OfxPropTime */ #define kOfxImageEffectActionIsIdentity "OfxImageEffectActionIsIdentity" @@ -490,6 +492,9 @@ These are the list of actions passed to an image effect plugin's main function. @actiondef inArgs: - OfxPropTime + - OfxImageEffectPropFieldToRender + - OfxImageEffectPropRenderWindow + - OfxImageEffectPropRenderScale - OfxImageEffectPropSequentialRenderStatus - OfxImageEffectPropInteractiveRenderStatus - OfxImageEffectPropRenderQualityDraft @@ -510,6 +515,7 @@ These are the list of actions passed to an image effect plugin's main function. - OfxImageEffectPropOpenGLTextureTarget - OfxImageEffectPropNoSpatialAwareness - OfxImageEffectPropThumbnailRender + - OfxImageEffectPropBehaviourWhenUnlicensed outArgs: */ #define kOfxImageEffectActionRender "OfxImageEffectActionRender" @@ -576,9 +582,9 @@ These are the list of actions passed to an image effect plugin's main function. - OfxImageEffectPropOpenGLEnabled - OfxImageEffectPropOpenGLTextureIndex - OfxImageEffectPropOpenGLTextureTarget - - OfxImageEffectPropInteractiveRenderStatus - OfxImageEffectPropNoSpatialAwareness - OfxImageEffectPropThumbnailRender + - OfxImageEffectPropBehaviourWhenUnlicensed outArgs: */ #define kOfxImageEffectActionBeginSequenceRender "OfxImageEffectActionBeginSequenceRender" @@ -642,7 +648,6 @@ These are the list of actions passed to an image effect plugin's main function. - OfxImageEffectPropOpenGLEnabled - OfxImageEffectPropOpenGLTextureIndex - OfxImageEffectPropOpenGLTextureTarget - - OfxImageEffectPropInteractiveRenderStatus outArgs: */ #define kOfxImageEffectActionEndSequenceRender "OfxImageEffectActionEndSequenceRender" @@ -1703,10 +1708,6 @@ This will be in \ref PixelCoordinates /** @brief The host's behaviour when the plug-in is unlicensed - - Type - string X 1 - - Property Set - inArgs property set of the \ref kOfxImageEffectActionBeginSequenceRender - and \ref kOfxImageEffectActionRender actions - If the plug-in determines that it is unlicensed during a \ref kOfxImageEffectActionBeginSequenceRender or \ref kOfxImageEffectActionRender action, it should check this property. @@ -1730,6 +1731,13 @@ If \ref kOfxImageEffectPropBehaviourWhenUnlicensed is set to - plug-in should return \ref kOfxStatUnlicensed and may do this without any rendering, because it knows the host will fail the render. + + @propdef + type: enum + dimension: 1 + values: + - OfxUnlicensedContinue + - OfxUnlicensedFail */ #define kOfxImageEffectPropBehaviourWhenUnlicensed "OfxImageEffectPropBehaviourWhenUnlicensed" diff --git a/include/ofxParam.h b/include/ofxParam.h index b5c5ac6d..f4804ef1 100644 --- a/include/ofxParam.h +++ b/include/ofxParam.h @@ -924,6 +924,8 @@ The interp value is a linear interpolation amount, however his may be derived fr @actiondef inArgs: + - OfxPropName + - OfxPropTime - OfxParamPropCustomValue - OfxParamPropInterpolationTime - OfxParamPropInterpolationAmount diff --git a/openfx-cpp/include/openfx/ofxPropSetAccessors.h b/openfx-cpp/include/openfx/ofxPropSetAccessors.h index 1b75ae06..eabe2628 100644 --- a/openfx-cpp/include/openfx/ofxPropSetAccessors.h +++ b/openfx-cpp/include/openfx/ofxPropSetAccessors.h @@ -285,6 +285,14 @@ class CustomParamInterpFunc_InArgs : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + std::array customValue() const { return props_.getAll(); } @@ -822,6 +830,10 @@ class ImageEffectActionBeginSequenceRender_InArgs : public PropertySetAccessor { return props_.get(0, error_if_missing); } + const char* behaviourWhenUnlicensed(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + }; // Property set accessor for: ImageEffectActionDescribeInContext_InArgs @@ -973,24 +985,6 @@ class ImageEffectActionGetFramesNeeded_InArgs : public PropertySetAccessor { }; -// Property set accessor for: ImageEffectActionGetFramesNeeded_OutArgs -class ImageEffectActionGetFramesNeeded_OutArgs : public PropertySetAccessor { -public: - using PropertySetAccessor::PropertySetAccessor; - - ImageEffectActionGetFramesNeeded_OutArgs& setFrameRange(const std::array& values, bool error_if_missing = true) { - props_.setAll(values, error_if_missing); - return *this; - } - - // Set all values from an initializer list (e.g., {1, 2}) - ImageEffectActionGetFramesNeeded_OutArgs& setFrameRange(std::initializer_list values, bool error_if_missing = true) { - props_.setAll(values, error_if_missing); - return *this; - } - -}; - // Property set accessor for: ImageEffectActionGetOutputColourspace_InArgs class ImageEffectActionGetOutputColourspace_InArgs : public PropertySetAccessor { public: @@ -1119,6 +1113,23 @@ class ImageEffectActionIsIdentity_InArgs : public PropertySetAccessor { }; +// Property set accessor for: ImageEffectActionIsIdentity_OutArgs +class ImageEffectActionIsIdentity_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + ImageEffectActionIsIdentity_OutArgs& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionIsIdentity_OutArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + +}; + // Property set accessor for: ImageEffectActionRender_InArgs class ImageEffectActionRender_InArgs : public PropertySetAccessor { public: @@ -1128,6 +1139,18 @@ class ImageEffectActionRender_InArgs : public PropertySetAccessor { return props_.get(0, error_if_missing); } + const char* fieldToRender(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + std::array renderWindow() const { + return props_.getAll(); + } + + std::array renderScale() const { + return props_.getAll(); + } + bool sequentialRenderStatus(bool error_if_missing = true) const { return props_.get(0, error_if_missing); } @@ -1208,6 +1231,10 @@ class ImageEffectActionRender_InArgs : public PropertySetAccessor { return props_.get(0, error_if_missing); } + const char* behaviourWhenUnlicensed(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + }; // Property set accessor for: ImageEffectHost diff --git a/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h b/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h index a0d9f4d9..8c596671 100644 --- a/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h +++ b/openfx-cpp/include/openfx/ofxPropSetAccessorsHost.h @@ -342,6 +342,16 @@ class CustomParamInterpFunc_InArgs : public PropertySetAccessor { public: using PropertySetAccessor::PropertySetAccessor; + CustomParamInterpFunc_InArgs& setName(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + CustomParamInterpFunc_InArgs& setTime(double value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + CustomParamInterpFunc_InArgs& setCustomValue(const std::array& values, bool error_if_missing = true) { props_.setAll(values, error_if_missing); return *this; @@ -865,6 +875,11 @@ class ImageEffectActionBeginSequenceRender_InArgs : public PropertySetAccessor { return *this; } + ImageEffectActionBeginSequenceRender_InArgs& setBehaviourWhenUnlicensed(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + }; // Property set accessor for: ImageEffectActionDescribeInContext_InArgs @@ -1047,17 +1062,6 @@ class ImageEffectActionGetFramesNeeded_InArgs : public PropertySetAccessor { }; -// Property set accessor for: ImageEffectActionGetFramesNeeded_OutArgs -class ImageEffectActionGetFramesNeeded_OutArgs : public PropertySetAccessor { -public: - using PropertySetAccessor::PropertySetAccessor; - - std::array frameRange() const { - return props_.getAll(); - } - -}; - // Property set accessor for: ImageEffectActionGetOutputColourspace_InArgs class ImageEffectActionGetOutputColourspace_InArgs : public PropertySetAccessor { public: @@ -1229,6 +1233,21 @@ class ImageEffectActionIsIdentity_InArgs : public PropertySetAccessor { }; +// Property set accessor for: ImageEffectActionIsIdentity_OutArgs +class ImageEffectActionIsIdentity_OutArgs : public PropertySetAccessor { +public: + using PropertySetAccessor::PropertySetAccessor; + + const char* name(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + + double time(bool error_if_missing = true) const { + return props_.get(0, error_if_missing); + } + +}; + // Property set accessor for: ImageEffectActionRender_InArgs class ImageEffectActionRender_InArgs : public PropertySetAccessor { public: @@ -1239,6 +1258,33 @@ class ImageEffectActionRender_InArgs : public PropertySetAccessor { return *this; } + ImageEffectActionRender_InArgs& setFieldToRender(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setRenderWindow(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionRender_InArgs& setRenderWindow(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + ImageEffectActionRender_InArgs& setRenderScale(const std::array& values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + + // Set all values from an initializer list (e.g., {1, 2}) + ImageEffectActionRender_InArgs& setRenderScale(std::initializer_list values, bool error_if_missing = true) { + props_.setAll(values, error_if_missing); + return *this; + } + ImageEffectActionRender_InArgs& setSequentialRenderStatus(bool value, bool error_if_missing = true) { props_.set(value, 0, error_if_missing); return *this; @@ -1339,6 +1385,11 @@ class ImageEffectActionRender_InArgs : public PropertySetAccessor { return *this; } + ImageEffectActionRender_InArgs& setBehaviourWhenUnlicensed(const char* value, bool error_if_missing = true) { + props_.set(value, 0, error_if_missing); + return *this; + } + }; // Property set accessor for: ImageEffectHost diff --git a/openfx-cpp/include/openfx/ofxPropsBySet.h b/openfx-cpp/include/openfx/ofxPropsBySet.h index bf25268e..d5e63119 100644 --- a/openfx-cpp/include/openfx/ofxPropsBySet.h +++ b/openfx-cpp/include/openfx/ofxPropsBySet.h @@ -642,7 +642,9 @@ static inline const std::map, std::vector, std::vector, std::vector, std::vector, std::vector, std::vector prop_defs = { openfx::span(prop_type_arrays::OfxImageEffectPluginPropSingleInstance_types, 1), 1, openfx::span()}, { "OfxImageEffectPluginRenderThreadSafety", openfx::span(prop_type_arrays::OfxImageEffectPluginRenderThreadSafety_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPluginRenderThreadSafety.data(), prop_enum_values::OfxImageEffectPluginRenderThreadSafety.size())}, +{ "OfxImageEffectPropBehaviourWhenUnlicensed", + openfx::span(prop_type_arrays::OfxImageEffectPropBehaviourWhenUnlicensed_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropBehaviourWhenUnlicensed.data(), prop_enum_values::OfxImageEffectPropBehaviourWhenUnlicensed.size())}, { "OfxImageEffectPropCPURenderSupported", openfx::span(prop_type_arrays::OfxImageEffectPropCPURenderSupported_types, 1), 1, openfx::span(prop_enum_values::OfxImageEffectPropCPURenderSupported.data(), prop_enum_values::OfxImageEffectPropCPURenderSupported.size())}, { "OfxImageEffectPropClipPreferencesSlaveParam", @@ -909,6 +915,7 @@ DEFINE_PROP_TRAITS(OfxImageEffectPluginPropOverlayInteractV1, void *, false); DEFINE_PROP_TRAITS(OfxImageEffectPluginPropOverlayInteractV2, void *, false); DEFINE_PROP_TRAITS(OfxImageEffectPluginPropSingleInstance, bool, false); DEFINE_PROP_TRAITS(OfxImageEffectPluginRenderThreadSafety, const char *, false); +DEFINE_PROP_TRAITS(OfxImageEffectPropBehaviourWhenUnlicensed, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropCPURenderSupported, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropClipPreferencesSlaveParam, const char *, false); DEFINE_PROP_TRAITS(OfxImageEffectPropColourManagementAvailableConfigs, const char *, false); @@ -1098,6 +1105,7 @@ static_assert(string_view("OfxImageEffectPluginPropOverlayInteractV1") == string static_assert(string_view("OfxImageEffectPluginPropOverlayInteractV2") == string_view(kOfxImageEffectPluginPropOverlayInteractV2)); static_assert(string_view("OfxImageEffectPluginPropSingleInstance") == string_view(kOfxImageEffectPluginPropSingleInstance)); static_assert(string_view("OfxImageEffectPluginRenderThreadSafety") == string_view(kOfxImageEffectPluginRenderThreadSafety)); +static_assert(string_view("OfxImageEffectPropBehaviourWhenUnlicensed") == string_view(kOfxImageEffectPropBehaviourWhenUnlicensed)); static_assert(string_view("OfxImageEffectPropCPURenderSupported") == string_view(kOfxImageEffectPropCPURenderSupported)); static_assert(string_view("OfxImageEffectPropClipPreferencesSlaveParam") == string_view(kOfxImageEffectPropClipPreferencesSlaveParam)); static_assert(string_view("OfxImageEffectPropColourManagementAvailableConfigs") == string_view(kOfxImageEffectPropColourManagementAvailableConfigs)); @@ -1284,6 +1292,8 @@ static_assert(string_view("kOfxImageEffectHostPropNativeOriginCenter") == string static_assert(string_view("OfxImageEffectRenderUnsafe") == string_view(kOfxImageEffectRenderUnsafe)); static_assert(string_view("OfxImageEffectRenderInstanceSafe") == string_view(kOfxImageEffectRenderInstanceSafe)); static_assert(string_view("OfxImageEffectRenderFullySafe") == string_view(kOfxImageEffectRenderFullySafe)); +static_assert(string_view("OfxUnlicensedContinue") == string_view(kOfxUnlicensedContinue)); +static_assert(string_view("OfxUnlicensedFail") == string_view(kOfxUnlicensedFail)); static_assert(string_view("OfxImageEffectColourManagementNone") == string_view(kOfxImageEffectColourManagementNone)); static_assert(string_view("OfxImageEffectColourManagementBasic") == string_view(kOfxImageEffectColourManagementBasic)); static_assert(string_view("OfxImageEffectColourManagementCore") == string_view(kOfxImageEffectColourManagementCore));