tahoma2d/toonz/sources/tnzext/SelfLoopDeformation.cpp

61 lines
1.8 KiB
C++
Raw Normal View History

2016-03-19 06:57:51 +13:00
#include "ext/SelfLoopDeformation.h"
#include "DeformationSelector.h"
#include <tstroke.h>
using namespace ToonzExt;
// REGISTER(SelfLoopDeformation);
2016-06-15 18:43:10 +12:00
SelfLoopDeformation::SelfLoopDeformation() {}
2016-03-19 06:57:51 +13:00
//--------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
SelfLoopDeformation::~SelfLoopDeformation() {}
2016-03-19 06:57:51 +13:00
//--------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
void SelfLoopDeformation::activate_impl(Context *, DraggerStatus *) {
assert(!"SelfLoopDeformation::activate not yet implemented!");
2016-03-19 06:57:51 +13:00
}
//--------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
bool SelfLoopDeformation::check(Context *dragger, DraggerStatus *status) {
assert(status && dragger && "Not dragger or status available");
assert(!"SelfLoopDeformation::check not yet implemented!");
// lengthOfAction_ = status->lengthOfAction_;
// deformerSensibility_ = status->deformerSensibility_;
// stroke2move_ = status->stroke2change_;
TStroke *s = stroke2move_;
// double &w = status->w_;
if (s->isSelfLoop()) {
// dragger->changeDeformation(SelfLoopDeformation::instance());
// SelfLoopDeformation::instance()->activate(dragger,
// status);
return true;
}
return false;
2016-03-19 06:57:51 +13:00
}
//--------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
void SelfLoopDeformation::update_impl(Context *, const TPointD &delta) {}
2016-03-19 06:57:51 +13:00
//--------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
void SelfLoopDeformation::deactivate_impl(Context *) {}
2016-03-19 06:57:51 +13:00
//--------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
void SelfLoopDeformation::draw(Designer *dr) {}
2016-03-19 06:57:51 +13:00
//--------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
SelfLoopDeformation *SelfLoopDeformation::instance() {
static SelfLoopDeformation singleton;
return &singleton;
2016-03-19 06:57:51 +13:00
}