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

Method add_node

editor/editor_data.cpp:1221–1240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219}
1220
1221void EditorSelection::add_node(Node *p_node) {
1222 ERR_FAIL_NULL(p_node);
1223 ERR_FAIL_COND(!p_node->is_inside_tree());
1224 if (selection.has(p_node)) {
1225 return;
1226 }
1227
1228 changed = true;
1229 node_list_changed = true;
1230 Object *meta = nullptr;
1231 for (Object *E : editor_plugins) {
1232 meta = E->call("_get_editor_data", p_node);
1233 if (meta) {
1234 break;
1235 }
1236 }
1237 selection[p_node] = meta;
1238
1239 p_node->connect(SceneStringName(tree_exiting), callable_mp(this, &EditorSelection::_node_removed).bind(p_node), CONNECT_ONE_SHOT);
1240}
1241
1242void EditorSelection::remove_node(Node *p_node) {
1243 ERR_FAIL_NULL(p_node);

Calls 5

is_inside_treeMethod · 0.80
connectMethod · 0.65
hasMethod · 0.45
callMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected