use uuid for identifying viewers

To aid generating a cache ID, each viewer node needs a UUID. Previous iterations
tried to hash a name and time, but a UUID is a much more efficient way to do
this.
This commit is contained in:
itsmattkc
2019-12-20 04:32:17 +11:00
parent 7398cd3f1c
commit 7a7d304268
6 changed files with 48 additions and 2 deletions
+8
View File
@@ -33,6 +33,9 @@ ViewerOutput::ViewerOutput()
length_input_ = new NodeInput("length_in");
length_input_->set_data_type(NodeInput::kRational);
AddInput(length_input_);
// Create UUID for this node
uuid_ = QUuid::createUuid();
}
Node *ViewerOutput::copy() const
@@ -125,6 +128,11 @@ rational ViewerOutput::Length()
return 0;
}
const QUuid &ViewerOutput::uuid() const
{
return uuid_;
}
void ViewerOutput::DependentEdgeChanged(NodeInput *from)
{
if (from == texture_input_) {