group: or original flags with additional flags
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user