tahoma2d/toonz/sources/tnzext/SelfLoopDeformation.cpp
2016-06-15 15:43:10 +09:00

60 lines
1.8 KiB
C++

#include "ext/SelfLoopDeformation.h"
#include "DeformationSelector.h"
#include <tstroke.h>
using namespace ToonzExt;
// REGISTER(SelfLoopDeformation);
SelfLoopDeformation::SelfLoopDeformation() {}
//--------------------------------------------------------------------
SelfLoopDeformation::~SelfLoopDeformation() {}
//--------------------------------------------------------------------
void SelfLoopDeformation::activate_impl(Context *, DraggerStatus *) {
assert(!"SelfLoopDeformation::activate not yet implemented!");
}
//--------------------------------------------------------------------
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;
}
//--------------------------------------------------------------------
void SelfLoopDeformation::update_impl(Context *, const TPointD &delta) {}
//--------------------------------------------------------------------
void SelfLoopDeformation::deactivate_impl(Context *) {}
//--------------------------------------------------------------------
void SelfLoopDeformation::draw(Designer *dr) {}
//--------------------------------------------------------------------
SelfLoopDeformation *SelfLoopDeformation::instance() {
static SelfLoopDeformation singleton;
return &singleton;
}