|
Jeremy Bullock |
3f9880 |
#include "texception.h"
|
|
Jeremy Bullock |
3f9880 |
#include "tfxparam.h"
|
|
Jeremy Bullock |
3f9880 |
#include "trop.h"
|
|
Jeremy Bullock |
3f9880 |
#include "stdfx.h"
|
|
Jeremy Bullock |
3f9880 |
#include "trasterfx.h"
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
//-------------------------------------------------------------------
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
class NothingFx final : public TStandardRasterFx {
|
|
Jeremy Bullock |
3f9880 |
FX_PLUGIN_DECLARATION(NothingFx)
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
TRasterFxPort m_input;
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
public:
|
|
Jeremy Bullock |
3f9880 |
NothingFx() {
|
|
Jeremy Bullock |
3f9880 |
addInputPort("Source", m_input);
|
|
shun-iwasawa |
481b59 |
enableComputeInFloat(true);
|
|
Jeremy Bullock |
3f9880 |
}
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
~NothingFx(){};
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
bool doGetBBox(double frame, TRectD &bBox,
|
|
Jeremy Bullock |
3f9880 |
const TRenderSettings &info) override {
|
|
Jeremy Bullock |
3f9880 |
if (m_input.isConnected()) {
|
|
Jeremy Bullock |
3f9880 |
bool ret = m_input->doGetBBox(frame, bBox, info);
|
|
Jeremy Bullock |
3f9880 |
return ret;
|
|
Jeremy Bullock |
3f9880 |
} else {
|
|
Jeremy Bullock |
3f9880 |
bBox = TRectD();
|
|
Jeremy Bullock |
3f9880 |
return false;
|
|
Jeremy Bullock |
3f9880 |
}
|
|
Jeremy Bullock |
3f9880 |
}
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
void transform(double frame, int port, const TRectD &rectOnOutput,
|
|
Jeremy Bullock |
3f9880 |
const TRenderSettings &infoOnOutput, TRectD &rectOnInput,
|
|
Jeremy Bullock |
3f9880 |
TRenderSettings &infoOnInput) override;
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
void doCompute(TTile &tile, double frame, const TRenderSettings &) override;
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
int getMemoryRequirement(const TRectD &rect, double frame,
|
|
Jeremy Bullock |
3f9880 |
const TRenderSettings &info) override;
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
bool canHandle(const TRenderSettings &info, double frame) override {
|
|
shun-iwasawa |
481b59 |
return true;
|
|
shun-iwasawa |
481b59 |
}
|
|
shun-iwasawa |
481b59 |
|
|
shun-iwasawa |
481b59 |
bool toBeComputedInLinearColorSpace(bool settingsIsLinear,
|
|
shun-iwasawa |
481b59 |
bool tileIsLinear) const override {
|
|
shun-iwasawa |
481b59 |
return tileIsLinear;
|
|
Jeremy Bullock |
3f9880 |
}
|
|
Jeremy Bullock |
3f9880 |
};
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
FX_PLUGIN_IDENTIFIER(NothingFx, "nothingFx")
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
//-------------------------------------------------------------------
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
void NothingFx::transform(double frame, int port, const TRectD &rectOnOutput,
|
|
shun-iwasawa |
481b59 |
const TRenderSettings &infoOnOutput,
|
|
shun-iwasawa |
481b59 |
TRectD &rectOnInput, TRenderSettings &infoOnInput) {
|
|
Jeremy Bullock |
3f9880 |
infoOnInput = infoOnOutput;
|
|
Jeremy Bullock |
3f9880 |
rectOnInput = rectOnOutput;
|
|
Jeremy Bullock |
3f9880 |
return;
|
|
Jeremy Bullock |
3f9880 |
}
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
//-------------------------------------------------------------------
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
int NothingFx::getMemoryRequirement(const TRectD &rect, double frame,
|
|
shun-iwasawa |
481b59 |
const TRenderSettings &info) {
|
|
shun-iwasawa |
481b59 |
return 0;
|
|
Jeremy Bullock |
3f9880 |
}
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
//-------------------------------------------------------------------
|
|
Jeremy Bullock |
3f9880 |
|
|
Jeremy Bullock |
3f9880 |
void NothingFx::doCompute(TTile &tile, double frame,
|
|
shun-iwasawa |
481b59 |
const TRenderSettings &renderSettings) {
|
|
Jeremy Bullock |
3f9880 |
if (!m_input.isConnected()) return;
|
|
Jeremy Bullock |
3f9880 |
m_input->compute(tile, frame, renderSettings);
|
|
Jeremy Bullock |
3f9880 |
}
|