@@ -1693,45 +1693,16 @@ void SceneTree::add_idle_callback(IdleCallback p_callback) {
16931693#ifdef TOOLS_ENABLED
16941694void SceneTree::get_argument_options (const StringName &p_function, int p_idx, List<String> *r_options) const {
16951695 const String pf = p_function;
1696- if (pf == " change_scene_to_file" ) {
1697- Ref<DirAccess> dir_access = DirAccess::create (DirAccess::ACCESS_RESOURCES);
1698- List<String> directories;
1699- directories.push_back (dir_access->get_current_dir ());
1700-
1701- while (!directories.is_empty ()) {
1702- dir_access->change_dir (directories.back ()->get ());
1703- directories.pop_back ();
1704-
1705- dir_access->list_dir_begin ();
1706- String filename = dir_access->get_next ();
1707-
1708- while (!filename.is_empty ()) {
1709- if (filename == " ." || filename == " .." ) {
1710- filename = dir_access->get_next ();
1711- continue ;
1712- }
1713-
1714- if (dir_access->dir_exists (filename)) {
1715- directories.push_back (dir_access->get_current_dir ().path_join (filename));
1716- } else if (filename.ends_with (" .tscn" ) || filename.ends_with (" .scn" )) {
1717- r_options->push_back (" \" " + dir_access->get_current_dir ().path_join (filename) + " \" " );
1718- }
1719-
1720- filename = dir_access->get_next ();
1721- }
1722- }
1723- } else {
1724- bool add_options = false ;
1725- if (p_idx == 0 ) {
1726- add_options = pf == " get_nodes_in_group" || pf == " has_group" || pf == " get_first_node_in_group" || pf == " set_group" || pf == " notify_group" || pf == " call_group" || pf == " add_to_group" ;
1727- } else if (p_idx == 1 ) {
1728- add_options = pf == " set_group_flags" || pf == " call_group_flags" || pf == " notify_group_flags" ;
1729- }
1730- if (add_options) {
1731- HashMap<StringName, String> global_groups = ProjectSettings::get_singleton ()->get_global_groups_list ();
1732- for (const KeyValue<StringName, String> &E : global_groups) {
1733- r_options->push_back (E.key .operator String ().quote ());
1734- }
1696+ bool add_options = false ;
1697+ if (p_idx == 0 ) {
1698+ add_options = pf == " get_nodes_in_group" || pf == " has_group" || pf == " get_first_node_in_group" || pf == " set_group" || pf == " notify_group" || pf == " call_group" || pf == " add_to_group" ;
1699+ } else if (p_idx == 1 ) {
1700+ add_options = pf == " set_group_flags" || pf == " call_group_flags" || pf == " notify_group_flags" ;
1701+ }
1702+ if (add_options) {
1703+ HashMap<StringName, String> global_groups = ProjectSettings::get_singleton ()->get_global_groups_list ();
1704+ for (const KeyValue<StringName, String> &E : global_groups) {
1705+ r_options->push_back (E.key .operator String ().quote ());
17351706 }
17361707 }
17371708 MainLoop::get_argument_options (p_function, p_idx, r_options);
0 commit comments