1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Add vararg call() method to C++ Callable

This commit is contained in:
kobewi
2023-07-11 16:18:10 +02:00
parent c7ed5d795e
commit 09b30be86d
27 changed files with 96 additions and 332 deletions

View File

@@ -3169,26 +3169,7 @@ AnimationTrackEdit::AnimationTrackEdit() {
AnimationTrackEdit *AnimationTrackEditPlugin::create_value_track_edit(Object *p_object, Variant::Type p_type, const String &p_property, PropertyHint p_hint, const String &p_hint_string, int p_usage) {
if (get_script_instance()) {
Variant args[6] = {
p_object,
p_type,
p_property,
p_hint,
p_hint_string,
p_usage
};
Variant *argptrs[6] = {
&args[0],
&args[1],
&args[2],
&args[3],
&args[4],
&args[5]
};
Callable::CallError ce;
return Object::cast_to<AnimationTrackEdit>(get_script_instance()->callp("create_value_track_edit", (const Variant **)&argptrs, 6, ce).operator Object *());
return Object::cast_to<AnimationTrackEdit>(get_script_instance()->call("create_value_track_edit", p_object, p_type, p_property, p_hint, p_hint_string, p_usage));
}
return nullptr;
}