summaryrefslogtreecommitdiffstats
path: root/scene/animation/animation_blend_tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_blend_tree.cpp')
-rw-r--r--scene/animation/animation_blend_tree.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 1b9a9e812d..4a01b2ad65 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -1545,8 +1545,9 @@ void AnimationNodeBlendTree::_node_changed(const StringName &p_node) {
emit_signal(SNAME("node_changed"), p_node);
}
+#ifdef TOOLS_ENABLED
void AnimationNodeBlendTree::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
- String pf = p_function;
+ const String pf = p_function;
bool add_node_options = false;
if (p_idx == 0) {
add_node_options = (pf == "get_node" || pf == "has_node" || pf == "rename_node" || pf == "remove_node" || pf == "set_node_position" || pf == "get_node_position" || pf == "connect_node" || pf == "disconnect_node");
@@ -1554,12 +1555,13 @@ void AnimationNodeBlendTree::get_argument_options(const StringName &p_function,
add_node_options = (pf == "connect_node" || pf == "disconnect_node");
}
if (add_node_options) {
- for (KeyValue<StringName, Node> E : nodes) {
+ for (const KeyValue<StringName, Node> &E : nodes) {
r_options->push_back(String(E.key).quote());
}
}
AnimationRootNode::get_argument_options(p_function, p_idx, r_options);
}
+#endif
void AnimationNodeBlendTree::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_node", "name", "node", "position"), &AnimationNodeBlendTree::add_node, DEFVAL(Vector2()));