diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-20 11:46:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 11:46:27 +0200 |
commit | c404fe5848a99c22cdeb4868456b5334b0bf2e72 (patch) | |
tree | 07ae73ef205b2c73d0c70b150767ee20fec7ad09 | |
parent | aec07538f47211a8fe87dbc4e42918478da03b1d (diff) | |
parent | 653334cc8d4f232034c6086bd7672bb9e04932b7 (diff) |
Merge pull request #38515 from Calinou/cli-scene-allow-res-tres
Allow `.res` and `.tres` extensions in the scene CLI positional argument
-rw-r--r-- | main/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index f35e73cdc2..a24f41a79e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1532,7 +1532,11 @@ bool Main::start() { } else if (args[i].length() && args[i][0] != '-' && positional_arg == "") { positional_arg = args[i]; - if (args[i].ends_with(".scn") || args[i].ends_with(".tscn") || args[i].ends_with(".escn")) { + if (args[i].ends_with(".scn") || + args[i].ends_with(".tscn") || + args[i].ends_with(".escn") || + args[i].ends_with(".res") || + args[i].ends_with(".tres")) { // Only consider the positional argument to be a scene path if it ends with // a file extension associated with Godot scenes. This makes it possible // for projects to parse command-line arguments for custom CLI arguments |