Add ValidatedCall to MethodBind

* This should optimize GDScript function calling _enormously_.
* It also should simplify the GDScript VM considerably.

NOTE: GDExtension calling performance has most likely been affected until going via ptrcall is fixed.
This commit is contained in:
Juan Linietsky
2023-04-25 00:21:32 +02:00
parent 14c582bca8
commit 1c93606e47
31 changed files with 299 additions and 84 deletions

View File

@ -305,6 +305,10 @@ Vector<StringName> AnimationNodeStateMachinePlayback::get_travel_path() const {
return path;
}
TypedArray<StringName> AnimationNodeStateMachinePlayback::_get_travel_path() const {
return Variant(get_travel_path()).operator Array();
}
float AnimationNodeStateMachinePlayback::get_current_play_pos() const {
return pos_current;
}
@ -1180,7 +1184,7 @@ void AnimationNodeStateMachinePlayback::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_play_position"), &AnimationNodeStateMachinePlayback::get_current_play_pos);
ClassDB::bind_method(D_METHOD("get_current_length"), &AnimationNodeStateMachinePlayback::get_current_length);
ClassDB::bind_method(D_METHOD("get_fading_from_node"), &AnimationNodeStateMachinePlayback::get_fading_from_node);
ClassDB::bind_method(D_METHOD("get_travel_path"), &AnimationNodeStateMachinePlayback::get_travel_path);
ClassDB::bind_method(D_METHOD("get_travel_path"), &AnimationNodeStateMachinePlayback::_get_travel_path);
}
AnimationNodeStateMachinePlayback::AnimationNodeStateMachinePlayback() {

View File

@ -314,6 +314,8 @@ class AnimationNodeStateMachinePlayback : public Resource {
Ref<AnimationNodeStateMachineTransition> _get_group_start_transition() const;
Ref<AnimationNodeStateMachineTransition> _get_group_end_transition() const;
TypedArray<StringName> _get_travel_path() const;
protected:
static void _bind_methods();