renderer: use shared backend when caching

I think there was an earlier commit with a similar name but turns out
I'd only done foundational work in that commit and never actually
properly set it up. Of course once I did, there were several issues that
needed fixing to make it work correctly, but now it works as expected.

Heavily optimizes larger projects by allowing cache jobs to only copy
what has changed.
This commit is contained in:
itsmattkc
2020-07-10 18:39:47 +10:00
parent 36dd06d2dc
commit efd90d5c8f
10 changed files with 104 additions and 55 deletions
+5 -3
View File
@@ -1007,7 +1007,7 @@ void NodeInput::set_is_keyframable(bool k)
keyframable_ = k;
}
void NodeInput::CopyValues(NodeInput *source, NodeInput *dest, bool include_connections)
void NodeInput::CopyValues(NodeInput *source, NodeInput *dest, bool include_connections, bool traverse_arrays)
{
Q_ASSERT(source->id() == dest->id());
@@ -1037,8 +1037,10 @@ void NodeInput::CopyValues(NodeInput *source, NodeInput *dest, bool include_conn
dst_array->SetSize(src_array->GetSize());
for (int i=0;i<dst_array->GetSize();i++) {
CopyValues(src_array->At(i), dst_array->At(i), include_connections);
if (traverse_arrays) {
for (int i=0;i<dst_array->GetSize();i++) {
CopyValues(src_array->At(i), dst_array->At(i), include_connections);
}
}
}
+1 -1
View File
@@ -235,7 +235,7 @@ public:
/**
* @brief Copy all values including keyframe information and connections from another NodeInput
*/
static void CopyValues(NodeInput* source, NodeInput* dest, bool include_connections = true);
static void CopyValues(NodeInput* source, NodeInput* dest, bool include_connections = true, bool traverse_arrays = true);
/**
* @brief Set an arbitrary property on this input to influence a UI representation's behavior