Compare commits

..

2 Commits

Author SHA1 Message Date
Martin Felis
6db99d126b WIP: Investigating crash on node connection. 2026-02-25 18:33:44 +01:00
Martin Felis
4a2ef2493d Fixed incomplete comment. 2026-02-23 21:25:13 +01:00

View File

@ -520,7 +520,7 @@ TEST_CASE_FIXTURE(BlendTreeFixture, "[SceneTree][Blendalot][BlendTreeGraph][Chan
CHECK(subgraph_blend2a_initial == blend_tree_graph.node_connection_info[blend_tree_graph.find_node_index(blend2_node_a)].input_subtree_node_indices);
CHECK(subgraph_blend2b_initial == blend_tree_graph.node_connection_info[blend_tree_graph.find_node_index(blend2_node_b)].input_subtree_node_indices);
// Check that we also do not
// Check that the connection is not present anymore.
for (const BLTBlendTreeConnection &connection : blend_tree_graph.connections) {
bool connection_equals_removed_connection = connection.source_node == blend2_node_b && connection.target_node == blend2_node_a && connection.target_port_name == "Input1";
CHECK(connection_equals_removed_connection == false);
@ -597,6 +597,32 @@ TEST_CASE_FIXTURE(BlendTreeFixture, "[SceneTree][Blendalot][BlendTreeGraph][Chan
CHECK(blend_tree_graph.node_connection_info[blend2_node_b_index_post_remove].input_subtree_node_indices.has(animation_sampler_node_c_index_post_remove));
}
}
SUBCASE("Reconnect graph") {
Ref<BLTAnimationNodeBlendTree> blend_tree_node;
blend_tree_node.instantiate();
blend_tree_node->add_node(animation_sampler_node_a);
blend_tree_node->add_node(animation_sampler_node_b);
blend_tree_node->add_node(animation_sampler_node_c);
blend_tree_node->add_node(blend2_node_a);
animation_graph->set_root_animation_node(blend_tree_node);
GraphEvaluationContext &graph_context = animation_graph->get_context();
REQUIRE(blend_tree_node->initialize(graph_context) == false);
REQUIRE(BLTAnimationNodeBlendTree::CONNECTION_OK == blend_tree_node->add_connection(animation_sampler_node_a, blend_tree_node->get_output_node(), "Output"));
REQUIRE(blend_tree_node->initialize(graph_context) == true);
REQUIRE(BLTAnimationNodeBlendTree::CONNECTION_OK == blend_tree_node->add_connection(animation_sampler_node_b, blend2_node_a, "Input0"));
REQUIRE(BLTAnimationNodeBlendTree::CONNECTION_OK == blend_tree_node->add_connection(animation_sampler_node_c, blend2_node_a, "Input1"));
REQUIRE(BLTAnimationNodeBlendTree::CONNECTION_OK == blend_tree_node->remove_connection(animation_sampler_node_a, blend_tree_node->get_output_node(), "Output"));
REQUIRE(BLTAnimationNodeBlendTree::CONNECTION_OK == blend_tree_node->add_connection(blend2_node_a, blend_tree_node->get_output_node(), "Output"));
REQUIRE(blend_tree_node->initialize(graph_context) == true);
blend_tree_graph.sort_nodes_and_references();
}
}
TEST_CASE_FIXTURE(BlendTreeFixture, "[SceneTree][Blendalot][BlendTreeGraph][EmbeddedBlendTree] BlendTree with an embedded BlendTree subgraph") {