OpenToonz - An open-source full-featured 2D animation creation software
C
Fx Pass Through (#1353)
Jeremy Bullock3f9880648b0a
diff --git a/stuff/config/current.txt b/stuff/config/current.txtindex 86f8d336b..4c73b4e75 100644--- a/stuff/config/current.txt+++ b/stuff/config/current.txt@@ -288,6 +288,8 @@<item>"STD_noiseFx.Black_White" "Black & White" </item><item>"STD_noiseFx.Animate" "Random Animation" </item>+ <item>"STD_nothingFx" "Pass Through" </item>+<item>"STD_paletteFilterFx" "Palette Filter" </item><item>"STD_paletteFilterFx.keep" "Action" </item><item>"STD_paletteFilterFx.type" "Apply To" </item>diff --git a/stuff/profiles/layouts/fxs/STD_nothingFx.xml b/stuff/profiles/layouts/fxs/STD_nothingFx.xmlnew file mode 100644index 000000000..892a73146--- /dev/null+++ b/stuff/profiles/layouts/fxs/STD_nothingFx.xml@@ -0,0 +1,6 @@+<fxlayout>+ <page name="Nothing">++ </page>++</fxlayout>diff --git a/stuff/profiles/layouts/fxs/fxs.lst b/stuff/profiles/layouts/fxs/fxs.lstindex bb853487b..31e688ab4 100644--- a/stuff/profiles/layouts/fxs/fxs.lst+++ b/stuff/profiles/layouts/fxs/fxs.lst@@ -176,4 +176,7 @@SHADER_radialblurGPUSHADER_spinblurGPU</Shaders>+ <Utility>+ STD_nothingFx+ </Utility></fxs>diff --git a/toonz/sources/stdfx/CMakeLists.txt b/toonz/sources/stdfx/CMakeLists.txtindex 26880bae6..4a03807b3 100644--- a/toonz/sources/stdfx/CMakeLists.txt+++ b/toonz/sources/stdfx/CMakeLists.txt@@ -113,6 +113,7 @@ set(SOURCESmotionblurfx.cppmultitonefx.cppnoisefx.cpp+ nothingfx.cpppalettefilterfx.cppparticles.cppparticlesengine.cppdiff --git a/toonz/sources/stdfx/nothingfx.cpp b/toonz/sources/stdfx/nothingfx.cppnew file mode 100644index 000000000..d82650bbc--- /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);+}