Files
oak-editor/app/node/factory.h
T
ThomasWilshawanditsmattkc f5b4729a19 Corner pin (#1851)
* Start adding a corner pin node

* Start gizmo support

* Correctly setup QVector2d inputs

* Missing breaks were causing incorect data to be set

* Add ability to override vertex coords

* Get perspective pin working

* Cleanup

* Add none perspective corner pin

* Small optimisation

* Improve comments, clean up and fix bug in job optimisation

* [skip ci] cornerpin: Improve description

* Move GL extension from shader to standard preamble.

* Use #version 130 for mobile GPU compatibility

* Cache half resolution

* Use built in NodeInputDragger::GetStartValue

* Pass cnst references to avoid deep copies

Co-authored-by: itsmattkc <itsmattkc@gmail.com>
2022-03-02 19:38:12 -08:00

103 lines
2.2 KiB
C++

/***
Olive - Non-Linear Video Editor
Copyright (C) 2021 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef NODEFACTORY_H
#define NODEFACTORY_H
#include <QList>
#include "node.h"
#include "widget/menu/menu.h"
namespace olive {
class NodeFactory
{
public:
enum InternalID {
kViewerOutput,
kClipBlock,
kGapBlock,
kPolygonGenerator,
kMatrixGenerator,
kTransformDistort,
kTrackOutput,
kAudioVolume,
kAudioPanning,
kMath,
kTime,
kTrigonometry,
kBlurFilter,
kSolidGenerator,
kMerge,
kStrokeFilter,
kTextGeneratorLegacy,
kTextGenerator,
kCrossDissolveTransition,
kDipToColorTransition,
kMosaicFilter,
kCropDistort,
kProjectFootage,
kProjectFolder,
kProjectSequence,
kValueNode,
kTimeRemapNode,
kSubtitleBlock,
kShapeGenerator,
kGroupNode,
kOpacityEffect,
kFlipDistort,
kNoiseGenerator,
kTimeOffsetNode,
kCornerPinDistort,
// Count value
kInternalNodeCount
};
NodeFactory() = default;
static void Initialize();
static void Destroy();
static Menu* CreateMenu(QWidget *parent, bool create_none_item = false, Node::CategoryID restrict_to = Node::kCategoryUnknown);
static Node* CreateFromMenuAction(QAction* action);
static QString GetIDFromMenuAction(QAction* action);
static QString GetNameFromID(const QString& id);
static Node* CreateFromID(const QString& id);
static Node* CreateFromFactoryIndex(const InternalID& id);
private:
static QList<Node*> library_;
static QVector<int> hidden_;
};
}
#endif // NODEFACTORY_H