summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-10-01 17:06:48 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-10-04 16:16:05 +0200
commitb85dfd990e26ffb22643d78e5f00ba135d1f97e7 (patch)
tree49a5a867b3f89af045b565c832716821b6f91a98 /scene/animation
parent865b62b1cddbb7989bc520eed2d8428c6923fee9 (diff)
GDScript completion: Handle quote style ad-hoc to remove editor dependency
`core` and `scene` shouldn't depend on `editor`, so they can't query this style setting in `get_argument_options`. But we can handle it after the fact in GDScript's completion code. Also cleans up a couple extra unused invalid includes in `core`.
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_player.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index a8d46eac6e..2c8c4ee788 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -37,7 +37,6 @@
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
-#include "editor/editor_settings.h"
#include "scene/2d/skeleton_2d.h"
void AnimatedValuesBackup::update_skeletons() {
@@ -1493,18 +1492,12 @@ NodePath AnimationPlayer::get_root() const {
}
void AnimationPlayer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
-#ifdef TOOLS_ENABLED
- const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
-#else
- const String quote_style = "\"";
-#endif
-
String pf = p_function;
if (p_idx == 0 && (p_function == "play" || p_function == "play_backwards" || p_function == "remove_animation" || p_function == "has_animation" || p_function == "queue")) {
List<StringName> al;
get_animation_list(&al);
for (const StringName &name : al) {
- r_options->push_back(String(name).quote(quote_style));
+ r_options->push_back(String(name).quote());
}
}
Node::get_argument_options(p_function, p_idx, r_options);