group: or original flags with additional flags

This commit is contained in:
itsmattkc
2022-01-22 17:15:56 -08:00
parent 4476a8d858
commit 42d744d624
3 changed files with 16 additions and 3 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ void NodeGroup::Retranslate()
}
}
QString NodeGroup::AddInputPassthrough(const NodeInput &input)
QString NodeGroup::AddInputPassthrough(const NodeInput &input, const InputFlags &flags)
{
Q_ASSERT(ContextContainsNode(input.node()));
@@ -72,7 +72,7 @@ QString NodeGroup::AddInputPassthrough(const NodeInput &input)
// Add input
QString id = GetGroupInputIDFromInput(input);
AddInput(id, input.GetDataType(), input.GetDefaultValue(), input.GetFlags());
AddInput(id, input.GetDataType(), input.GetDefaultValue(), input.GetFlags() | flags);
input_passthroughs_.insert(id, input);
+1 -1
View File
@@ -41,7 +41,7 @@ public:
virtual void Retranslate() override;
QString AddInputPassthrough(const NodeInput &input);
QString AddInputPassthrough(const NodeInput &input, const InputFlags &flags = InputFlags());
void RemoveInputPassthrough(const NodeInput &input);
+13
View File
@@ -57,6 +57,19 @@ public:
return f_ & f;
}
InputFlags operator|(const InputFlags &f) const
{
InputFlags i = *this;
i |= f;
return i;
}
InputFlags &operator|=(const InputFlags &f)
{
f_ |= f.f_;
return *this;
}
private:
uint64_t f_;