groups: started revision
- Removed UUIDs since we already have ptrs - Changed input passthroughs from map to list so they'll always be added in the same order - Fixed group copy on duplication - Fixed group copy on clip split
This commit is contained in:
+27
-7
@@ -52,9 +52,9 @@ public:
|
||||
|
||||
void SetOutputPassthrough(Node *node);
|
||||
|
||||
static QString GetGroupInputIDFromInput(const NodeInput &input);
|
||||
|
||||
const QHash<QString, NodeInput> &GetInputPassthroughs() const
|
||||
using InputPassthrough = QPair<QString, NodeInput>;
|
||||
using InputPassthroughs = QVector<InputPassthrough>;
|
||||
const InputPassthroughs &GetInputPassthroughs() const
|
||||
{
|
||||
return input_passthroughs_;
|
||||
}
|
||||
@@ -66,15 +66,35 @@ public:
|
||||
static NodeInput ResolveInput(NodeInput input);
|
||||
static bool GetInner(NodeInput *input);
|
||||
|
||||
QString GetIDOfPassthrough(const NodeInput &input) const
|
||||
{
|
||||
for (auto it=input_passthroughs_.cbegin(); it!=input_passthroughs_.cend(); it++) {
|
||||
if (it->second == input) {
|
||||
return it->first;
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
NodeInput GetInputFromID(const QString &id) const
|
||||
{
|
||||
for (auto it=input_passthroughs_.cbegin(); it!=input_passthroughs_.cend(); it++) {
|
||||
if (it->first == id) {
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
return NodeInput();
|
||||
}
|
||||
|
||||
signals:
|
||||
void InputPassthroughAdded(NodeGroup *group, const NodeInput &input);
|
||||
void InputPassthroughAdded(olive::NodeGroup *group, const olive::NodeInput &input);
|
||||
|
||||
void InputPassthroughRemoved(NodeGroup *group, const NodeInput &input);
|
||||
void InputPassthroughRemoved(olive::NodeGroup *group, const olive::NodeInput &input);
|
||||
|
||||
void OutputPassthroughChanged(NodeGroup *group, Node *output);
|
||||
void OutputPassthroughChanged(olive::NodeGroup *group, olive::Node *output);
|
||||
|
||||
private:
|
||||
QHash<QString, NodeInput> input_passthroughs_;
|
||||
InputPassthroughs input_passthroughs_;
|
||||
|
||||
Node *output_passthrough_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user