|
@@ -2054,6 +2054,26 @@ void AnimationMixer::_notification(int p_what) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void AnimationMixer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
|
|
|
+ String pf = p_function;
|
|
|
|
+ if (p_idx == 0) {
|
|
|
|
+ if (pf == "get_animation" || pf == "has_animation") {
|
|
|
|
+ List<StringName> al;
|
|
|
|
+ get_animation_list(&al);
|
|
|
|
+ for (const StringName &name : al) {
|
|
|
|
+ r_options->push_back(String(name).quote());
|
|
|
|
+ }
|
|
|
|
+ } else if (pf == "get_animation_library" || pf == "has_animation_library" || pf == "remove_animation_library" || pf == "rename_animation_library") {
|
|
|
|
+ List<StringName> al;
|
|
|
|
+ get_animation_library_list(&al);
|
|
|
|
+ for (const StringName &name : al) {
|
|
|
|
+ r_options->push_back(String(name).quote());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Node::get_argument_options(p_function, p_idx, r_options);
|
|
|
|
+}
|
|
|
|
+
|
|
void AnimationMixer::_bind_methods() {
|
|
void AnimationMixer::_bind_methods() {
|
|
/* ---- Data lists ---- */
|
|
/* ---- Data lists ---- */
|
|
ClassDB::bind_method(D_METHOD("add_animation_library", "name", "library"), &AnimationMixer::add_animation_library);
|
|
ClassDB::bind_method(D_METHOD("add_animation_library", "name", "library"), &AnimationMixer::add_animation_library);
|