Blame toonz/sources/toonzlib/tfxhandle.cpp
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "toonz/tfxhandle.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tfx.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TFxHandle::TFxHandle()
|
|
Toshihiro Shimizu |
890ddd |
: m_fx(0), m_previousActionString()
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TFxHandle::~TFxHandle()
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
if (m_fx)
|
|
Toshihiro Shimizu |
890ddd |
m_fx->release();
|
|
Toshihiro Shimizu |
890ddd |
m_fx = 0;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// do not switch fx settings when single-clicking the fx node in the schematic
|
|
Toshihiro Shimizu |
890ddd |
void TFxHandle::setFx(TFx *fx, bool doSwitchFxSettings)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
if (m_fx == fx)
|
|
Toshihiro Shimizu |
890ddd |
return;
|
|
Toshihiro Shimizu |
890ddd |
if (fx)
|
|
Toshihiro Shimizu |
890ddd |
fx->addRef();
|
|
Toshihiro Shimizu |
890ddd |
if (m_fx)
|
|
Toshihiro Shimizu |
890ddd |
m_fx->release();
|
|
Toshihiro Shimizu |
890ddd |
m_fx = fx;
|
|
Toshihiro Shimizu |
890ddd |
emit fxSwitched();
|
|
Toshihiro Shimizu |
890ddd |
if (doSwitchFxSettings)
|
|
Toshihiro Shimizu |
890ddd |
emit fxSettingsShouldBeSwitched();
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void TFxHandle::onColumnChanged()
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
}
|