merged effects into node structure

This commit is contained in:
itsmattkc
2019-04-12 21:50:52 +10:00
parent 4e4d2b1881
commit b21745f694
127 changed files with 1674 additions and 867 deletions
+37 -2
View File
@@ -43,8 +43,8 @@
#include "panels/viewer.h"
#include "ui/viewerwidget.h"
TransformEffect::TransformEffect(Clip* c, const EffectMeta* em) : Effect(c, em) {
SetFlags(Effect::CoordsFlag);
TransformEffect::TransformEffect(Clip* c) : Node(c) {
SetFlags(Node::CoordsFlag);
position = new Vec2Input(this, "pos", tr("Position"));
@@ -125,6 +125,41 @@ TransformEffect::TransformEffect(Clip* c, const EffectMeta* em) : Effect(c, em)
refresh();
}
QString TransformEffect::name()
{
return tr("Transform");
}
QString TransformEffect::id()
{
return "org.olivevideoeditor.Olive.transform";
}
QString TransformEffect::category()
{
return tr("Distort");
}
QString TransformEffect::description()
{
return tr("Transform the position, scale, and rotation of this clip.");
}
EffectType TransformEffect::type()
{
return EFFECT_TYPE_EFFECT;
}
olive::TrackType TransformEffect::subtype()
{
return olive::kTypeVideo;
}
NodePtr TransformEffect::Create(Clip *c)
{
return std::make_shared<TransformEffect>(c);
}
void TransformEffect::refresh() {
if (parent_clip != nullptr && parent_clip->track()->sequence() != nullptr) {