From 2f7c3714d25886740ba3278c0e82c0e24049904f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= Date: Sat, 4 Feb 2017 21:48:34 +0100 Subject: [PATCH] update openfx --- Add/Add.cpp | 12 ++++++++++-- AdjustRoD/AdjustRoD.cpp | 3 ++- Multiply/Multiply.cpp | 26 +++++++++++++++++++++++--- openfx | 2 +- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/Add/Add.cpp b/Add/Add.cpp index 1ddca468f..e937cda2b 100644 --- a/Add/Add.cpp +++ b/Add/Add.cpp @@ -380,12 +380,20 @@ class AddPlugin , _premultChanged(0) { _dstClip = fetchClip(kOfxImageEffectOutputClipName); - assert( _dstClip && (!_dstClip->isConnected() || _dstClip->getPixelComponents() == ePixelComponentAlpha || + assert( _dstClip && (!_dstClip->isConnected() || + _dstClip->getPixelComponents() == ePixelComponentAlpha || +#ifdef OFX_EXTENSIONS_NATRON + _dstClip->getPixelComponents() == ePixelComponentXY || +#endif _dstClip->getPixelComponents() == ePixelComponentRGB || _dstClip->getPixelComponents() == ePixelComponentRGBA) ); _srcClip = getContext() == eContextGenerator ? NULL : fetchClip(kOfxImageEffectSimpleSourceClipName); assert( (!_srcClip && getContext() == eContextGenerator) || - ( _srcClip && (!_srcClip->isConnected() || _srcClip->getPixelComponents() == ePixelComponentAlpha || + ( _srcClip && (!_srcClip->isConnected() || + _srcClip->getPixelComponents() == ePixelComponentAlpha || +#ifdef OFX_EXTENSIONS_NATRON + _srcClip->getPixelComponents() == ePixelComponentXY || +#endif _srcClip->getPixelComponents() == ePixelComponentRGB || _srcClip->getPixelComponents() == ePixelComponentRGBA) ) ); _maskClip = fetchClip(getContext() == eContextPaint ? "Brush" : "Mask"); diff --git a/AdjustRoD/AdjustRoD.cpp b/AdjustRoD/AdjustRoD.cpp index fa8d0cab4..3aca28a2d 100644 --- a/AdjustRoD/AdjustRoD.cpp +++ b/AdjustRoD/AdjustRoD.cpp @@ -89,7 +89,8 @@ class AdjustRoDPlugin , _size(0) { _dstClip = fetchClip(kOfxImageEffectOutputClipName); - assert( _dstClip && (!_dstClip->isConnected() || _dstClip->getPixelComponents() == ePixelComponentAlpha || + assert( _dstClip && (!_dstClip->isConnected() || + _dstClip->getPixelComponents() == ePixelComponentAlpha || _dstClip->getPixelComponents() == ePixelComponentRGB || _dstClip->getPixelComponents() == ePixelComponentRGBA) ); _srcClip = getContext() == eContextGenerator ? NULL : fetchClip(kOfxImageEffectSimpleSourceClipName); diff --git a/Multiply/Multiply.cpp b/Multiply/Multiply.cpp index 97acb9dd4..cae40fa1b 100644 --- a/Multiply/Multiply.cpp +++ b/Multiply/Multiply.cpp @@ -334,11 +334,21 @@ class MultiplyPlugin , _premultChanged(0) { _dstClip = fetchClip(kOfxImageEffectOutputClipName); - assert( _dstClip && (!_dstClip->isConnected() || _dstClip->getPixelComponents() == ePixelComponentRGB || + assert( _dstClip && (!_dstClip->isConnected() || + _dstClip->getPixelComponents() == ePixelComponentAlpha || +#ifdef OFX_EXTENSIONS_NATRON + _dstClip->getPixelComponents() == ePixelComponentXY || +#endif + _dstClip->getPixelComponents() == ePixelComponentRGB || _dstClip->getPixelComponents() == ePixelComponentRGBA) ); _srcClip = getContext() == eContextGenerator ? NULL : fetchClip(kOfxImageEffectSimpleSourceClipName); assert( (!_srcClip && getContext() == eContextGenerator) || - ( _srcClip && (!_srcClip->isConnected() || _srcClip->getPixelComponents() == ePixelComponentRGB || + ( _srcClip && (!_srcClip->isConnected() || + _srcClip->getPixelComponents() == ePixelComponentAlpha || +#ifdef OFX_EXTENSIONS_NATRON + _srcClip->getPixelComponents() == ePixelComponentXY || +#endif + _srcClip->getPixelComponents() == ePixelComponentRGB || _srcClip->getPixelComponents() == ePixelComponentRGBA) ) ); _maskClip = fetchClip(getContext() == eContextPaint ? "Brush" : "Mask"); assert(!_maskClip || !_maskClip->isConnected() || _maskClip->getPixelComponents() == ePixelComponentAlpha); @@ -490,7 +500,11 @@ MultiplyPlugin::render(const RenderArguments &args) assert( kSupportsMultipleClipPARs || !_srcClip || _srcClip->getPixelAspectRatio() == _dstClip->getPixelAspectRatio() ); assert( kSupportsMultipleClipDepths || !_srcClip || _srcClip->getPixelDepth() == _dstClip->getPixelDepth() ); - assert(dstComponents == ePixelComponentAlpha || dstComponents == ePixelComponentXY || dstComponents == ePixelComponentRGB || dstComponents == ePixelComponentRGBA); + assert(dstComponents == ePixelComponentAlpha || +#ifdef OFX_EXTENSIONS_NATRON + dstComponents == ePixelComponentXY || +#endif + dstComponents == ePixelComponentRGB || dstComponents == ePixelComponentRGBA); if (dstComponents == ePixelComponentRGBA) { switch (dstBitDepth) { case eBitDepthUByte: { @@ -531,6 +545,7 @@ MultiplyPlugin::render(const RenderArguments &args) default: throwSuiteStatusException(kOfxStatErrUnsupported); } +#ifdef OFX_EXTENSIONS_NATRON } else if (dstComponents == ePixelComponentXY) { switch (dstBitDepth) { case eBitDepthUByte: { @@ -551,6 +566,7 @@ MultiplyPlugin::render(const RenderArguments &args) default: throwSuiteStatusException(kOfxStatErrUnsupported); } +#endif } else { assert(dstComponents == ePixelComponentRGB); switch (dstBitDepth) { @@ -705,7 +721,9 @@ MultiplyPluginFactory::describeInContext(ImageEffectDescriptor &desc, srcClip->addSupportedComponent(ePixelComponentRGBA); srcClip->addSupportedComponent(ePixelComponentRGB); +#ifdef OFX_EXTENSIONS_NATRON srcClip->addSupportedComponent(ePixelComponentXY); +#endif srcClip->addSupportedComponent(ePixelComponentAlpha); srcClip->setTemporalClipAccess(false); srcClip->setSupportsTiles(kSupportsTiles); @@ -715,7 +733,9 @@ MultiplyPluginFactory::describeInContext(ImageEffectDescriptor &desc, ClipDescriptor *dstClip = desc.defineClip(kOfxImageEffectOutputClipName); dstClip->addSupportedComponent(ePixelComponentRGBA); dstClip->addSupportedComponent(ePixelComponentRGB); +#ifdef OFX_EXTENSIONS_NATRON dstClip->addSupportedComponent(ePixelComponentXY); +#endif dstClip->addSupportedComponent(ePixelComponentAlpha); dstClip->setSupportsTiles(kSupportsTiles); diff --git a/openfx b/openfx index 715d996a5..15f441e05 160000 --- a/openfx +++ b/openfx @@ -1 +1 @@ -Subproject commit 715d996a53f97d425a1d42dab558c3144cacd7a6 +Subproject commit 15f441e05b46a914fb45481abd458f750b73d693