1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Suggest scene unique nodes in get_node autocompletion

This commit is contained in:
HolonProduction
2023-11-26 15:41:29 +01:00
parent fa4a65387e
commit 8cc85515af
2 changed files with 24 additions and 5 deletions

View File

@@ -3029,6 +3029,10 @@ static void _add_nodes_to_options(const Node *p_base, const Node *p_node, List<S
if (p_node != p_base && !p_node->get_owner()) {
return;
}
if (p_node->is_unique_name_in_owner() && p_node->get_owner() == p_base) {
String n = "%" + p_node->get_name();
r_options->push_back(n.quote());
}
String n = p_base->get_path_to(p_node);
r_options->push_back(n.quote());
for (int i = 0; i < p_node->get_child_count(); i++) {