| 1446 | } |
| 1447 | |
| 1448 | void VisualShaderGraphPlugin::remove_node(VisualShader::Type p_type, int p_id, bool p_just_update) { |
| 1449 | if (editor->get_current_shader_type() == p_type && links.has(p_id)) { |
| 1450 | GraphEdit *graph_edit = editor->graph; |
| 1451 | if (!graph_edit) { |
| 1452 | return; |
| 1453 | } |
| 1454 | |
| 1455 | graph_edit->remove_child(links[p_id].graph_element); |
| 1456 | memdelete(links[p_id].graph_element); |
| 1457 | if (!p_just_update) { |
| 1458 | links.erase(p_id); |
| 1459 | } |
| 1460 | } |
| 1461 | } |
| 1462 | |
| 1463 | void VisualShaderGraphPlugin::connect_nodes(VisualShader::Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port) { |
| 1464 | GraphEdit *graph = editor->graph; |
no test coverage detected