Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "toonz/tfxhandle.h"
Toshihiro Shimizu 890ddd
#include "tfx.h"
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TFxHandle::TFxHandle() : m_fx(0), m_previousActionString() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
TFxHandle::~TFxHandle() {
Shinya Kitaoka 120a6e
  if (m_fx) m_fx->release();
Shinya Kitaoka 120a6e
  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
Shinya Kitaoka 120a6e
void TFxHandle::setFx(TFx *fx, bool doSwitchFxSettings) {
Shinya Kitaoka 120a6e
  if (m_fx == fx) return;
Shinya Kitaoka 120a6e
  if (fx) fx->addRef();
Shinya Kitaoka 120a6e
  if (m_fx) m_fx->release();
Shinya Kitaoka 120a6e
  m_fx = fx;
Shinya Kitaoka 120a6e
  emit fxSwitched();
Shinya Kitaoka 120a6e
  if (doSwitchFxSettings) emit fxSettingsShouldBeSwitched();
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
void TFxHandle::onColumnChanged() {}