nodes: revert to single output

This commit is contained in:
itsmattkc
2021-09-07 22:01:36 -07:00
parent 9843fd47f0
commit b07bccb7dc
89 changed files with 511 additions and 616 deletions
+25 -46
View File
@@ -41,51 +41,6 @@ struct NodeInputPair {
QString input;
};
/**
* @brief Defines a node output
*/
class NodeOutput
{
public:
NodeOutput(Node* n, const QString& o)
{
node_ = n;
output_ = o;
}
NodeOutput(Node* n);
NodeOutput()
{
node_ = nullptr;
}
bool operator==(const NodeOutput& rhs) const
{
return node_ == rhs.node_ && output_ == rhs.output_;
}
Node* node() const
{
return node_;
}
const QString& output() const
{
return output_;
}
bool IsValid() const
{
return node_;
}
private:
Node* node_;
QString output_;
};
/**
* @brief Defines a Node input
*/
@@ -166,7 +121,7 @@ public:
bool IsArray() const;
NodeOutput GetConnectedOutput() const;
Node *GetConnectedOutput() const;
NodeValue::Type GetDataType() const;
@@ -192,6 +147,30 @@ private:
};
struct InputElementPair {
QString input;
int element;
bool operator<(const InputElementPair &rhs) const
{
if (input != rhs.input) {
return input < rhs.input;
}
return element < rhs.element;
}
bool operator==(const InputElementPair &rhs) const
{
return input == rhs.input && element == rhs.element;
}
bool operator!=(const InputElementPair &rhs) const
{
return !(*this == rhs);
}
};
class NodeKeyframeTrackReference {
public:
NodeKeyframeTrackReference()