diff --git a/stuff/config/current.txt b/stuff/config/current.txt index 86f8d33..4c73b4e 100644 --- a/stuff/config/current.txt +++ b/stuff/config/current.txt @@ -288,6 +288,8 @@ "STD_noiseFx.Black_White" "Black & White" "STD_noiseFx.Animate" "Random Animation" + "STD_nothingFx" "Pass Through" + "STD_paletteFilterFx" "Palette Filter" "STD_paletteFilterFx.keep" "Action" "STD_paletteFilterFx.type" "Apply To" diff --git a/stuff/profiles/layouts/fxs/STD_nothingFx.xml b/stuff/profiles/layouts/fxs/STD_nothingFx.xml new file mode 100644 index 0000000..892a731 --- /dev/null +++ b/stuff/profiles/layouts/fxs/STD_nothingFx.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/stuff/profiles/layouts/fxs/fxs.lst b/stuff/profiles/layouts/fxs/fxs.lst index bb85348..31e688a 100644 --- a/stuff/profiles/layouts/fxs/fxs.lst +++ b/stuff/profiles/layouts/fxs/fxs.lst @@ -176,4 +176,7 @@ SHADER_radialblurGPU SHADER_spinblurGPU + + STD_nothingFx + diff --git a/toonz/sources/stdfx/CMakeLists.txt b/toonz/sources/stdfx/CMakeLists.txt index 26880ba..4a03807 100644 --- a/toonz/sources/stdfx/CMakeLists.txt +++ b/toonz/sources/stdfx/CMakeLists.txt @@ -113,6 +113,7 @@ set(SOURCES motionblurfx.cpp multitonefx.cpp noisefx.cpp + nothingfx.cpp palettefilterfx.cpp particles.cpp particlesengine.cpp diff --git a/toonz/sources/stdfx/nothingfx.cpp b/toonz/sources/stdfx/nothingfx.cpp new file mode 100644 index 0000000..d82650b --- /dev/null +++ b/toonz/sources/stdfx/nothingfx.cpp @@ -0,0 +1,71 @@ +#include "texception.h" +#include "tfxparam.h" +#include "trop.h" +#include "stdfx.h" +#include "trasterfx.h" + +//------------------------------------------------------------------- + +class NothingFx final : public TStandardRasterFx { + FX_PLUGIN_DECLARATION(NothingFx) + + TRasterFxPort m_input; + +public: + NothingFx() { + addInputPort("Source", m_input); + } + + ~NothingFx(){}; + + bool doGetBBox(double frame, TRectD &bBox, + const TRenderSettings &info) override { + if (m_input.isConnected()) { + bool ret = m_input->doGetBBox(frame, bBox, info); + return ret; + } else { + bBox = TRectD(); + return false; + } + } + + void transform(double frame, int port, const TRectD &rectOnOutput, + const TRenderSettings &infoOnOutput, TRectD &rectOnInput, + TRenderSettings &infoOnInput) override; + + void doCompute(TTile &tile, double frame, const TRenderSettings &) override; + + int getMemoryRequirement(const TRectD &rect, double frame, + const TRenderSettings &info) override; + + bool canHandle(const TRenderSettings &info, double frame) override { + return true; + } +}; + +FX_PLUGIN_IDENTIFIER(NothingFx, "nothingFx") + +//------------------------------------------------------------------- + +void NothingFx::transform(double frame, int port, const TRectD &rectOnOutput, + const TRenderSettings &infoOnOutput, TRectD &rectOnInput, + TRenderSettings &infoOnInput) { + infoOnInput = infoOnOutput; + rectOnInput = rectOnOutput; + return; +} + +//------------------------------------------------------------------- + +int NothingFx::getMemoryRequirement(const TRectD &rect, double frame, + const TRenderSettings &info) { + return 0; +} + +//------------------------------------------------------------------- + +void NothingFx::doCompute(TTile &tile, double frame, + const TRenderSettings &renderSettings) { + if (!m_input.isConnected()) return; + m_input->compute(tile, frame, renderSettings); +}