|
@@ -1667,10 +1667,24 @@ AnimationNode::NodeTimeInfo AnimationNodeBlendTree::_process(const AnimationMixe
|
|
return _blend_node(output, "output", this, pi, FILTER_IGNORE, true, p_test_only, nullptr);
|
|
return _blend_node(output, "output", this, pi, FILTER_IGNORE, true, p_test_only, nullptr);
|
|
}
|
|
}
|
|
|
|
|
|
-void AnimationNodeBlendTree::get_node_list(List<StringName> *r_list) {
|
|
|
|
|
|
+LocalVector<StringName> AnimationNodeBlendTree::get_node_list() const {
|
|
|
|
+ LocalVector<StringName> list;
|
|
|
|
+ list.reserve(nodes.size());
|
|
for (const KeyValue<StringName, Node> &E : nodes) {
|
|
for (const KeyValue<StringName, Node> &E : nodes) {
|
|
- r_list->push_back(E.key);
|
|
|
|
|
|
+ list.push_back(E.key);
|
|
}
|
|
}
|
|
|
|
+ list.sort_custom<StringName::AlphCompare>();
|
|
|
|
+ return list;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+TypedArray<StringName> AnimationNodeBlendTree::get_node_list_as_typed_array() const {
|
|
|
|
+ TypedArray<StringName> typed_arr;
|
|
|
|
+ LocalVector<StringName> vec = get_node_list();
|
|
|
|
+ typed_arr.resize(vec.size());
|
|
|
|
+ for (uint32_t i = 0; i < vec.size(); i++) {
|
|
|
|
+ typed_arr[i] = vec[i];
|
|
|
|
+ }
|
|
|
|
+ return typed_arr;
|
|
}
|
|
}
|
|
|
|
|
|
void AnimationNodeBlendTree::set_graph_offset(const Vector2 &p_graph_offset) {
|
|
void AnimationNodeBlendTree::set_graph_offset(const Vector2 &p_graph_offset) {
|
|
@@ -1827,6 +1841,7 @@ void AnimationNodeBlendTree::_bind_methods() {
|
|
ClassDB::bind_method(D_METHOD("has_node", "name"), &AnimationNodeBlendTree::has_node);
|
|
ClassDB::bind_method(D_METHOD("has_node", "name"), &AnimationNodeBlendTree::has_node);
|
|
ClassDB::bind_method(D_METHOD("connect_node", "input_node", "input_index", "output_node"), &AnimationNodeBlendTree::connect_node);
|
|
ClassDB::bind_method(D_METHOD("connect_node", "input_node", "input_index", "output_node"), &AnimationNodeBlendTree::connect_node);
|
|
ClassDB::bind_method(D_METHOD("disconnect_node", "input_node", "input_index"), &AnimationNodeBlendTree::disconnect_node);
|
|
ClassDB::bind_method(D_METHOD("disconnect_node", "input_node", "input_index"), &AnimationNodeBlendTree::disconnect_node);
|
|
|
|
+ ClassDB::bind_method(D_METHOD("get_node_list"), &AnimationNodeBlendTree::get_node_list_as_typed_array);
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_node_position", "name", "position"), &AnimationNodeBlendTree::set_node_position);
|
|
ClassDB::bind_method(D_METHOD("set_node_position", "name", "position"), &AnimationNodeBlendTree::set_node_position);
|
|
ClassDB::bind_method(D_METHOD("get_node_position", "name"), &AnimationNodeBlendTree::get_node_position);
|
|
ClassDB::bind_method(D_METHOD("get_node_position", "name"), &AnimationNodeBlendTree::get_node_position);
|