diff options
Diffstat (limited to 'scene/animation/animation_node_state_machine.cpp')
-rw-r--r-- | scene/animation/animation_node_state_machine.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index 36399505c1..ec44641484 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -1793,8 +1793,9 @@ void AnimationNodeStateMachine::_animation_node_removed(const ObjectID &p_oid, c AnimationRootNode::_animation_node_removed(p_oid, p_node); } +#ifdef TOOLS_ENABLED void AnimationNodeStateMachine::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_state_options = false; if (p_idx == 0) { add_state_options = (pf == "get_node" || pf == "has_node" || pf == "rename_node" || pf == "remove_node" || pf == "replace_node" || pf == "set_node_position" || pf == "get_node_position"); @@ -1802,12 +1803,13 @@ void AnimationNodeStateMachine::get_argument_options(const StringName &p_functio add_state_options = (pf == "has_transition" || pf == "add_transition" || pf == "remove_transition"); } if (add_state_options) { - for (KeyValue<StringName, State> E : states) { + for (const KeyValue<StringName, State> &E : states) { r_options->push_back(String(E.key).quote()); } } AnimationRootNode::get_argument_options(p_function, p_idx, r_options); } +#endif void AnimationNodeStateMachine::_bind_methods() { ClassDB::bind_method(D_METHOD("add_node", "name", "node", "position"), &AnimationNodeStateMachine::add_node, DEFVAL(Vector2())); |