MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / remove_node

Method remove_node

editor/shader/visual_shader_editor_plugin.cpp:1448–1461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1446}
1447
1448void 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
1463void 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;

Callers 6

_select_click_on_itemMethod · 0.45
_update_filterMethod · 0.45
_cell_multi_selectedMethod · 0.45
_select_clickedMethod · 0.45
_resources_removedMethod · 0.45
_tool_selectedMethod · 0.45

Calls 5

memdeleteFunction · 0.85
hasMethod · 0.45
remove_childMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected