remove hashes from nodes

This commit is contained in:
itsmattkc
2022-05-09 18:30:36 -07:00
parent 0538c01f45
commit 08f3cb3cc3
27 changed files with 0 additions and 349 deletions
-33
View File
@@ -101,37 +101,4 @@ void MergeNode::Value(const NodeValueRow &value, const NodeGlobals &globals, Nod
}
}
void MergeNode::Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams &video_params) const
{
NodeTraverser traverser;
traverser.SetCacheVideoParams(video_params);
NodeValueDatabase db = traverser.GenerateDatabase(this, globals.time());
TexturePtr base_tex = db[kBaseIn].Get(NodeValue::kTexture).toTexture();
TexturePtr blend_tex = db[kBlendIn].Get(NodeValue::kTexture).toTexture();
if (base_tex || blend_tex) {
bool passthrough_base = !blend_tex;
bool passthrough_blend = !base_tex || (blend_tex && blend_tex->channel_count() < VideoParams::kRGBAChannelCount);
if (!passthrough_base && !passthrough_blend) {
// This merge will actually do something so we add a fingerprint
HashAddNodeSignature(hash);
}
if (!passthrough_base) {
Node *blend_output = GetConnectedOutput(kBlendIn);
Node::Hash(blend_output, GetValueHintForInput(kBlendIn), hash, globals, video_params);
}
if (!passthrough_blend) {
Node *base_output = GetConnectedOutput(kBaseIn);
Node::Hash(base_output, GetValueHintForInput(kBaseIn), hash, globals, video_params);
}
Q_ASSERT(!passthrough_base || !passthrough_blend);
}
}
}
-3
View File
@@ -46,9 +46,6 @@ public:
static const QString kBaseIn;
static const QString kBlendIn;
protected:
virtual void Hash(QCryptographicHash &hash, const NodeGlobals &globals, const VideoParams& video_params) const override;
private:
NodeInput* base_in_;