Skip to content

Commit

Permalink
update openfx
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Feb 4, 2017
1 parent 5d1f969 commit 2f7c371
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
12 changes: 10 additions & 2 deletions Add/Add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
3 changes: 2 additions & 1 deletion AdjustRoD/AdjustRoD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
26 changes: 23 additions & 3 deletions Multiply/Multiply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -531,6 +545,7 @@ MultiplyPlugin::render(const RenderArguments &args)
default:
throwSuiteStatusException(kOfxStatErrUnsupported);
}
#ifdef OFX_EXTENSIONS_NATRON
} else if (dstComponents == ePixelComponentXY) {
switch (dstBitDepth) {
case eBitDepthUByte: {
Expand All @@ -551,6 +566,7 @@ MultiplyPlugin::render(const RenderArguments &args)
default:
throwSuiteStatusException(kOfxStatErrUnsupported);
}
#endif
} else {
assert(dstComponents == ePixelComponentRGB);
switch (dstBitDepth) {
Expand Down Expand Up @@ -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);
Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion openfx

0 comments on commit 2f7c371

Please sign in to comment.