renderer: always hash along edges

This commit is contained in:
itsmattkc
2021-09-19 23:11:20 -07:00
parent 67c7c71ca2
commit 7ba5dca4ab
30 changed files with 76 additions and 59 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ void XMLConnectNodes(const XMLNodeData &xml_node_data, MultiUndoCommand *command
Node::ConnectEdge(out, con.input);
/// Deprecated: backwards compatibility only
con.input.node()->SetValueHintForInput(con.input.input(), con.input.element(), {{}, -1, con.output_param});
con.input.node()->SetValueHintForInput(con.input.input(), {{}, -1, con.output_param}, con.input.element());
}
}
}
+2 -2
View File
@@ -109,7 +109,7 @@ bool Block::HashPassthrough(const QString &input, QCryptographicHash &hash, cons
new_globals.set_time(t);
Node *out = GetConnectedOutput(input);
out->Hash(GetValueHintForInput(input, -1), hash, new_globals, video_params);
Node::Hash(out, GetValueHintForInput(input), hash, new_globals, video_params);
return true;
}
@@ -130,7 +130,7 @@ void Block::Retranslate()
SetInputName(kEnabledInput, tr("Enabled"));
}
void Block::Hash(const ValueHint &hint, QCryptographicHash &, const NodeGlobals &, const VideoParams &) const
void Block::Hash(QCryptographicHash &, const NodeGlobals &, const VideoParams &) const
{
// A block does nothing by default, so we hash nothing
}
+2 -2
View File
@@ -115,8 +115,6 @@ public:
index_ = i;
}
virtual void Hash(const Node::ValueHint &hint, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1, InvalidateCacheOptions options = InvalidateCacheOptions()) override;
static const QString kLengthInput;
@@ -134,6 +132,8 @@ signals:
protected:
virtual void InputValueChangedEvent(const QString& input, int element) override;
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
bool HashPassthrough(const QString &input, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const;
Block* previous_;
+2 -2
View File
@@ -51,7 +51,7 @@ ClipBlock::ClipBlock() :
IgnoreHashingFrom(kReverseInput);
PrependInput(kBufferIn, NodeValue::kNone, InputFlags(kInputFlagNotKeyframable));
SetValueHintForInput(kBufferIn, -1, {NodeValue::kBuffer, -1, QString()});
SetValueHintForInput(kBufferIn, {NodeValue::kBuffer, -1, QString()});
}
Node *ClipBlock::copy() const
@@ -264,7 +264,7 @@ void ClipBlock::Retranslate()
SetInputName(kReverseInput, tr("Reverse"));
}
void ClipBlock::Hash(const ValueHint &out, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void ClipBlock::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
HashPassthrough(kBufferIn, hash, globals, video_params);
}
+2 -2
View File
@@ -59,8 +59,6 @@ public:
virtual void Retranslate() override;
virtual void Hash(const Node::ValueHint& output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
double speed() const
{
return GetStandardValue(kSpeedInput).toDouble();
@@ -111,6 +109,8 @@ protected:
virtual void InputValueChangedEvent(const QString &input, int element) override;
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
private:
rational SequenceToMediaTime(const rational& sequence_time, bool ignore_reverse = false) const;
+1 -1
View File
@@ -137,7 +137,7 @@ double TransitionBlock::GetInProgress(const double &time) const
return clamp((GetInternalTransitionTime(time) - out_offset().toDouble()) / in_offset().toDouble(), 0.0, 1.0);
}
void TransitionBlock::Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void TransitionBlock::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
if (HashPassthrough(kInBlockInput, hash, globals, video_params)
|| HashPassthrough(kOutBlockInput, hash, globals, video_params)) {
+2 -2
View File
@@ -65,8 +65,6 @@ public:
double GetOutProgress(const double &time) const;
double GetInProgress(const double &time) const;
virtual void Hash(const ValueHint& output, QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1, InvalidateCacheOptions options = InvalidateCacheOptions()) override;
@@ -91,6 +89,8 @@ protected:
virtual TimeRange OutputTimeAdjustment(const QString& input, int element, const TimeRange& input_time) const override;
virtual void Hash(QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
private:
enum CurveType {
kLinear,
@@ -312,7 +312,7 @@ void TransformDistortNode::GizmoRelease()
gizmo_drag_ = nullptr;
}
void TransformDistortNode::Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void TransformDistortNode::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
// If not connected to output, this will produce nothing
Node *out = GetConnectedOutput(kTextureInput);
@@ -338,7 +338,7 @@ void TransformDistortNode::Hash(const ValueHint &output, QCryptographicHash &has
}
}
out->Hash(GetValueHintForInput(kTextureInput, -1), hash, globals, video_params);
Node::Hash(out, GetValueHintForInput(kTextureInput), hash, globals, video_params);
}
QMatrix4x4 TransformDistortNode::AdjustMatrixByResolutions(const QMatrix4x4 &mat, const QVector2D &sequence_res, const QVector2D &texture_res, AutoScaleType autoscale_type)
@@ -80,8 +80,6 @@ public:
virtual void GizmoMove(const QPointF &p, const rational &time) override;
virtual void GizmoRelease() override;
virtual void Hash(const ValueHint& output, QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
enum AutoScaleType {
kAutoScaleNone,
kAutoScaleFit,
@@ -98,6 +96,9 @@ public:
static const QString kAutoscaleInput;
static const QString kInterpolationInput;
protected:
virtual void Hash(QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
private:
static QPointF CreateScalePoint(double x, double y, const QPointF& half_res, const QMatrix4x4& mat);
+4 -2
View File
@@ -22,6 +22,8 @@
namespace olive {
#define super Node
TimeInput::TimeInput()
{
}
@@ -60,9 +62,9 @@ void TimeInput::Value(const NodeValueRow &value, const NodeGlobals &globals, Nod
QStringLiteral("time"));
}
void TimeInput::Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void TimeInput::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
Node::Hash(output, hash, globals, video_params);
super::Hash(hash, globals, video_params);
// Make sure time is hashed
hash.addData(NodeValue::ValueToBytes(NodeValue::kFloat, globals.time().in().toDouble()));
+2 -1
View File
@@ -42,7 +42,8 @@ public:
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
virtual void Hash(const ValueHint& output, QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
protected:
virtual void Hash(QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
};
+3 -3
View File
@@ -100,7 +100,7 @@ void MergeNode::Value(const NodeValueRow &value, const NodeGlobals &globals, Nod
}
}
void MergeNode::Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void MergeNode::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
NodeTraverser traverser;
traverser.SetCacheVideoParams(video_params);
@@ -121,12 +121,12 @@ void MergeNode::Hash(const ValueHint &output, QCryptographicHash &hash, const No
if (!passthrough_base) {
Node *blend_output = GetConnectedOutput(kBlendIn);
blend_output->Hash(GetValueHintForInput(kBlendIn, -1), hash, globals, video_params);
Node::Hash(blend_output, GetValueHintForInput(kBlendIn), hash, globals, video_params);
}
if (!passthrough_blend) {
Node *base_output = GetConnectedOutput(kBaseIn);
base_output->Hash(GetValueHintForInput(kBaseIn, -1), hash, globals, video_params);
Node::Hash(base_output, GetValueHintForInput(kBaseIn), hash, globals, video_params);
}
Q_ASSERT(!passthrough_base || !passthrough_blend);
+2 -1
View File
@@ -48,7 +48,8 @@ public:
static const QString kBaseIn;
static const QString kBlendIn;
virtual void Hash(const ValueHint& output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
protected:
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
private:
NodeInput* base_in_;
+16 -5
View File
@@ -1015,7 +1015,18 @@ int Node::InputArraySize(const QString &id) const
}
}
void Node::SetValueHintForInput(const QString &input, int element, const ValueHint &hint)
void Node::Hash(const Node *node, const ValueHint &hint, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params)
{
if (!hint.type.isEmpty()) {
hash.addData(reinterpret_cast<const char*>(hint.type.constData()), sizeof(NodeValue::Type) * hint.type.size());
}
hash.addData(reinterpret_cast<const char*>(&hint.index), sizeof(hint.index));
hash.addData(hint.tag.toUtf8());
node->Hash(hash, globals, video_params);
}
void Node::SetValueHintForInput(const QString &input, const ValueHint &hint, int element)
{
value_hints_.insert({input, element}, hint);
@@ -1146,7 +1157,7 @@ void Node::CopyDependencyGraph(const QVector<Node *> &src, const QVector<Node *>
command->add_child(new NodeSetValueHintCommand(copied_input, src_node->GetValueHintForInput(copied_input.input(), copied_input.element())));
} else {
ConnectEdge(copied_output, copied_input);
copied_input.node()->SetValueHintForInput(copied_input.input(), copied_input.element(), src_node->GetValueHintForInput(copied_input.input(), copied_input.element()));
copied_input.node()->SetValueHintForInput(copied_input.input(), src_node->GetValueHintForInput(copied_input.input(), copied_input.element()), copied_input.element());
}
}
}
@@ -1486,7 +1497,7 @@ QString Node::GetLabelOrName() const
return GetLabel();
}
void Node::Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void Node::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
// Add this Node's ID and output being used
HashAddNodeSignature(hash);
@@ -1576,7 +1587,7 @@ void Node::CopyValuesOfElement(const Node *src, Node *dst, const QString &input,
}
// Copy value hint
dst->SetValueHintForInput(input, dst_element, src->GetValueHintForInput(input, src_element));
dst->SetValueHintForInput(input, src->GetValueHintForInput(input, src_element), dst_element);
}
bool Node::CanBeDeleted() const
@@ -1635,7 +1646,7 @@ void Node::HashInputElement(QCryptographicHash &hash, const QString& input, int
NodeGlobals new_globals = globals;
new_globals.set_time(input_time);
output->Hash(GetValueHintForInput(input, element), hash, new_globals, video_params);
Node::Hash(output, GetValueHintForInput(input, element), hash, new_globals, video_params);
} else {
// Grab the value at this time
QVariant value = GetValueAtTime(input, input_time.in(), element);
+6 -4
View File
@@ -473,12 +473,14 @@ public:
void Save(QXmlStreamWriter *writer) const;
};
ValueHint GetValueHintForInput(const QString &input, int element) const
static void Hash(const Node *node, const ValueHint &hint, QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params);
ValueHint GetValueHintForInput(const QString &input, int element = -1) const
{
return value_hints_.value({input, element});
}
void SetValueHintForInput(const QString &input, int element, const ValueHint &hint);
void SetValueHintForInput(const QString &input, const ValueHint &hint, int element = -1);
const NodeKeyframeTrack& GetTrackFromKeyframe(NodeKeyframe* key) const;
@@ -731,8 +733,6 @@ public:
QString GetLabelAndName() const;
QString GetLabelOrName() const;
virtual void Hash(const ValueHint &output, QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const;
void InvalidateAll(const QString& input, int element = -1);
bool HasLinks() const
@@ -852,6 +852,8 @@ protected:
};
virtual void Hash(QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const;
void HashAddNodeSignature(QCryptographicHash &hash) const;
void InsertInput(const QString& id, NodeValue::Type type, const QVariant& default_value, InputFlags flags, int index);
+2 -4
View File
@@ -571,17 +571,15 @@ bool Track::IsLocked() const
return locked_;
}
void Track::Hash(const Node::ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void Track::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
Q_UNUSED(output)
Block* b = BlockAtTime(globals.time().in());
// Defer to block at this time, don't add any of our own information to the hash
if (b) {
NodeGlobals new_globals = globals;
new_globals.set_time(TransformRangeForBlock(b, globals.time()));
b->Hash(GetValueHintForInput(kBlockInput, GetArrayIndexFromBlock(b)), hash, new_globals, video_params);
Node::Hash(b, GetValueHintForInput(kBlockInput, GetArrayIndexFromBlock(b)), hash, new_globals, video_params);
}
}
+2 -1
View File
@@ -359,7 +359,6 @@ public:
bool IsLocked() const;
virtual void Hash(const Node::ValueHint& output, QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
int GetArrayIndexFromBlock(Block* block) const;
@@ -412,6 +411,8 @@ signals:
void BlocksRefreshed();
protected:
virtual void Hash(QCryptographicHash& hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
virtual bool LoadCustom(QXmlStreamReader* reader, XMLNodeData& xml_node_data, uint version, const QAtomicInt* cancelled) override;
virtual void SaveCustom(QXmlStreamWriter* writer) const override;
+2 -2
View File
@@ -340,7 +340,7 @@ rational ViewerOutput::VerifyLengthInternal(Track::Type type) const
switch (type) {
case Track::kVideo:
if (IsInputConnected(kTextureInput)) {
NodeValueTable t = traverser.GenerateTable(GetConnectedOutput(kTextureInput), GetValueHintForInput(kTextureInput, -1), TimeRange(0, 0));
NodeValueTable t = traverser.GenerateTable(GetConnectedOutput(kTextureInput), GetValueHintForInput(kTextureInput), TimeRange(0, 0));
rational r = t.Get(NodeValue::kRational, QStringLiteral("length")).value<rational>();
if (!r.isNaN()) {
return r;
@@ -349,7 +349,7 @@ rational ViewerOutput::VerifyLengthInternal(Track::Type type) const
break;
case Track::kAudio:
if (IsInputConnected(kSamplesInput)) {
NodeValueTable t = traverser.GenerateTable(GetConnectedOutput(kSamplesInput), GetValueHintForInput(kSamplesInput, -1), TimeRange(0, 0));
NodeValueTable t = traverser.GenerateTable(GetConnectedOutput(kSamplesInput), GetValueHintForInput(kSamplesInput), TimeRange(0, 0));
rational r = t.Get(NodeValue::kRational, QStringLiteral("length")).value<rational>();;
if (!r.isNaN()) {
return r;
+2 -2
View File
@@ -335,9 +335,9 @@ QString Footage::DescribeAudioStream(const AudioParams &params)
QString::number(params.sample_rate()));
}
void Footage::Hash(const Node::ValueHint& output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void Footage::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
super::Hash(output, hash, globals, video_params);
super::Hash(hash, globals, video_params);
// Footage last modified date
hash.addData(QString::number(timestamp()).toUtf8());
+2 -2
View File
@@ -179,8 +179,6 @@ public:
static QString DescribeVideoStream(const VideoParams& params);
static QString DescribeAudioStream(const AudioParams& params);
virtual void Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
static QString GetStreamTypeName(Track::Type type);
@@ -212,6 +210,8 @@ protected:
virtual rational VerifyLengthInternal(Track::Type type) const override;
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
private:
QString GetColorspaceToUse(const VideoParams& params) const;
+2 -3
View File
@@ -93,16 +93,15 @@ void TimeRemapNode::Retranslate()
SetInputName(kInputInput, QStringLiteral("Input"));
}
void TimeRemapNode::Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
void TimeRemapNode::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
// Don't hash anything of our own, just pass-through to the connected node at the remapped tmie
Q_UNUSED(output)
if (IsInputConnected(kInputInput)) {
Node *out = GetConnectedOutput(kInputInput);
NodeGlobals new_globals = globals;
new_globals.set_time(TimeRange(GetRemappedTime(globals.time().in()), GetRemappedTime(globals.time().out())));
out->Hash(GetValueHintForInput(kInputInput, -1), hash, new_globals, video_params);
Node::Hash(out, GetValueHintForInput(kInputInput), hash, new_globals, video_params);
}
}
+3 -2
View File
@@ -45,11 +45,12 @@ public:
virtual void Retranslate() override;
virtual void Hash(const ValueHint &output, QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
static const QString kTimeInput;
static const QString kInputInput;
protected:
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
private:
rational GetRemappedTime(const rational& input) const;
+1 -1
View File
@@ -163,7 +163,7 @@ NodeValueTable NodeTraverser::ProcessInput(const Node* node, const QString& inpu
TimeRange adjusted_range = node->InputTimeAdjustment(input, -1, range);
// Value will equal something from the connected node, follow it
return GenerateTable(node->GetConnectedOutput(input), node->GetValueHintForInput(input, -1), adjusted_range);
return GenerateTable(node->GetConnectedOutput(input), node->GetValueHintForInput(input), adjusted_range);
} else {
+2 -2
View File
@@ -69,7 +69,7 @@ QVector<PreviewAutoCacher::HashData> PreviewAutoCacher::GenerateHashes(ViewerOut
const rational &time = times.at(i);
// See if hash already exists in disk cache
QByteArray hash = RenderManager::Hash(viewer->GetConnectedTextureOutput(), viewer->GetValueHintForInput(ViewerOutput::kTextureInput, -1), viewer->GetVideoParams(), time);
QByteArray hash = RenderManager::Hash(viewer->GetConnectedTextureOutput(), viewer->GetValueHintForInput(ViewerOutput::kTextureInput), viewer->GetVideoParams(), time);
// Check memory list since disk checking is slow
bool hash_exists = existing_hashes.contains(hash);
@@ -392,7 +392,7 @@ void PreviewAutoCacher::CopyValueHint(const NodeInput &input)
{
Node* our_input = copy_map_.value(input.node());
Node::ValueHint hint = input.node()->GetValueHintForInput(input.input(), input.element());
our_input->SetValueHintForInput(input.input(), input.element(), hint);
our_input->SetValueHintForInput(input.input(), hint, input.element());
}
void PreviewAutoCacher::InsertIntoCopyMap(Node *node, Node *copy)
+1 -1
View File
@@ -118,7 +118,7 @@ QByteArray RenderManager::Hash(const Node *n, const Node::ValueHint &output, con
hasher.addData(reinterpret_cast<const char*>(&interlacing), sizeof(interlacing));
if (n) {
n->Hash(output, hasher, NodeTraverser::GenerateGlobals(params, time), params);
Node::Hash(n, output, hasher, NodeTraverser::GenerateGlobals(params, time), params);
}
return hasher.result();
+2 -2
View File
@@ -49,7 +49,7 @@ TexturePtr RenderProcessor::GenerateTexture(const rational &time, const rational
NodeValueTable table;
Node *texture_output = viewer->GetConnectedTextureOutput();
if (texture_output) {
table = GenerateTable(texture_output, viewer->GetValueHintForInput(ViewerOutput::kTextureInput, -1), TimeRange(time, time + frame_length));
table = GenerateTable(texture_output, viewer->GetValueHintForInput(ViewerOutput::kTextureInput), TimeRange(time, time + frame_length));
}
return table.Get(NodeValue::kTexture).value<TexturePtr>();
@@ -171,7 +171,7 @@ void RenderProcessor::Run()
NodeValueTable table;
Node *texture_output = viewer->GetConnectedSampleOutput();
if (texture_output) {
table = GenerateTable(texture_output, viewer->GetValueHintForInput(ViewerOutput::kSamplesInput, -1),time);
table = GenerateTable(texture_output, viewer->GetValueHintForInput(ViewerOutput::kSamplesInput),time);
}
QVariant sample_variant = table.Get(NodeValue::kSamples);
+1 -1
View File
@@ -49,7 +49,7 @@ PreCacheTask::PreCacheTask(Footage *footage, int index, Sequence* sequence)
Node::CopyInputs(footage, footage_, false);
Node::ConnectEdge(footage_, NodeInput(viewer(), ViewerOutput::kTextureInput));
viewer()->SetValueHintForInput(ViewerOutput::kTextureInput, -1, {{NodeValue::kTexture}, -1, Track::Reference(Track::kVideo, index).ToString()});
viewer()->SetValueHintForInput(ViewerOutput::kTextureInput, {{NodeValue::kTexture}, -1, Track::Reference(Track::kVideo, index).ToString()});
SetTitle(tr("Pre-caching %1:%2").arg(footage_->filename(), QString::number(index)));
}
+1 -1
View File
@@ -91,7 +91,7 @@ bool RenderTask::Render(ColorManager* manager,
}
times[i] = r;
hashes[i] = RenderManager::instance()->Hash(viewer()->GetConnectedTextureOutput(), viewer()->GetValueHintForInput(ViewerOutput::kTextureInput, -1), video_params_, r);
hashes[i] = RenderManager::instance()->Hash(viewer()->GetConnectedTextureOutput(), viewer()->GetValueHintForInput(ViewerOutput::kTextureInput), video_params_, r);
}
// Filter out duplicates
@@ -204,12 +204,12 @@ void NodeParamArrayAppendCommand::undo()
void NodeSetValueHintCommand::redo()
{
old_hint_ = input_.node()->GetValueHintForInput(input_.input(), input_.element());
input_.node()->SetValueHintForInput(input_.input(), input_.element(), new_hint_);
input_.node()->SetValueHintForInput(input_.input(), new_hint_, input_.element());
}
void NodeSetValueHintCommand::undo()
{
input_.node()->SetValueHintForInput(input_.input(), input_.element(), old_hint_);
input_.node()->SetValueHintForInput(input_.input(), old_hint_, input_.element());
}
}
+1 -1
View File
@@ -76,7 +76,7 @@ void NodeValueTree::RadioButtonChecked(bool e)
Node::ValueHint hint = btn->property("hint").value<Node::ValueHint>();
NodeInput input = btn->property("input").value<NodeInput>();
input.node()->SetValueHintForInput(input.input(), input.element(), hint);
input.node()->SetValueHintForInput(input.input(), hint, input.element());
}
}