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

Method _method_changed

editor/debugger/script_editor_debugger.cpp:1403–1446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1401}
1402
1403void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount) {
1404 if (!p_base || !live_debug || !is_session_active() || !EditorNode::get_singleton()->get_edited_scene()) {
1405 return;
1406 }
1407
1408 Node *node = Object::cast_to<Node>(p_base);
1409
1410 for (int i = 0; i < p_argcount; i++) {
1411 //no pointers, sorry
1412 if (p_args[i]->get_type() == Variant::OBJECT || p_args[i]->get_type() == Variant::RID) {
1413 return;
1414 }
1415 }
1416
1417 if (node) {
1418 NodePath path = EditorNode::get_singleton()->get_edited_scene()->get_path_to(node);
1419 int pathid = _get_node_path_cache(path);
1420
1421 Array msg = { pathid, p_name };
1422 for (int i = 0; i < p_argcount; i++) {
1423 //no pointers, sorry
1424 msg.push_back(*p_args[i]);
1425 }
1426 _put_msg("scene:live_node_call", msg);
1427
1428 return;
1429 }
1430
1431 Resource *res = Object::cast_to<Resource>(p_base);
1432
1433 if (res && !res->get_path().is_empty()) {
1434 String respath = res->get_path();
1435 int pathid = _get_res_path_cache(respath);
1436
1437 Array msg = { pathid, p_name };
1438 for (int i = 0; i < p_argcount; i++) {
1439 //no pointers, sorry
1440 msg.push_back(*p_args[i]);
1441 }
1442 _put_msg("scene:live_res_call", msg);
1443
1444 return;
1445 }
1446}
1447
1448void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) {
1449 if (!p_base || !live_debug || !EditorNode::get_singleton()->get_edited_scene()) {

Callers 1

_methods_changedMethod · 0.80

Calls 6

get_path_toMethod · 0.80
get_edited_sceneMethod · 0.45
get_typeMethod · 0.45
push_backMethod · 0.45
is_emptyMethod · 0.45
get_pathMethod · 0.45

Tested by

no test coverage detected