groups: started revision

- Removed UUIDs since we already have ptrs
- Changed input passthroughs from map to list so they'll always be added in the same order
- Fixed group copy on duplication
- Fixed group copy on clip split
This commit is contained in:
itsmattkc
2022-04-03 19:18:39 -07:00
parent 49e622ac0f
commit afaf6bcf92
12 changed files with 174 additions and 82 deletions
+10 -3
View File
@@ -378,9 +378,6 @@ void PreviewAutoCacher::AddNode(Node *node)
// Add to project
copy->setParent(&copied_project_);
// Copy UUID
copy->SetUUID(node->GetUUID());
// Insert into map
InsertIntoCopyMap(node, copy);
@@ -420,6 +417,11 @@ void PreviewAutoCacher::RemoveEdge(Node *output, const NodeInput &input)
void PreviewAutoCacher::CopyValue(const NodeInput &input)
{
if (dynamic_cast<NodeGroup*>(input.node())) {
// Group nodes are just dummy nodes, no need to copy them
return;
}
// Copy all values to our graph
Node* our_input = copy_map_.value(input.node());
Node::CopyValuesOfElement(input.node(), our_input, input.input(), input.element());
@@ -427,6 +429,11 @@ void PreviewAutoCacher::CopyValue(const NodeInput &input)
void PreviewAutoCacher::CopyValueHint(const NodeInput &input)
{
if (dynamic_cast<NodeGroup*>(input.node())) {
// Group nodes are just dummy nodes, no need to copy them
return;
}
// Copy value hint to our graph
Node* our_input = copy_map_.value(input.node());
Node::ValueHint hint = input.node()->GetValueHintForInput(input.input(), input.element());