From 96eaa49fbbf967613ceca0315288aa5979548573 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 17 Dec 2025 21:39:21 +0000 Subject: [PATCH] Bind AudioStreamInteractive TRANSITION_TO_TIME_PREVIOUS_POSITION In C++, enum AudioStreamInteractive::TransitionToTime has three "real" members, plus MAX. Previously only TRANSITION_TO_TIME_SAME_POSITION and TRANSITION_TO_TIME_START were bound for GDScript. But TRANSITION_TO_TIME_PREVIOUS_POSITION can be set via the editor, so can easily appear in an AudioStreamInteractive resource without needing to drop down to C++. I can't see anything to suggest that it was deliberately not exposed. Bind this enum member. Add documentation. Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- modules/interactive_music/audio_stream_interactive.cpp | 1 + .../interactive_music/doc_classes/AudioStreamInteractive.xml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/modules/interactive_music/audio_stream_interactive.cpp b/modules/interactive_music/audio_stream_interactive.cpp index 71192681f0..fb6a8a1106 100644 --- a/modules/interactive_music/audio_stream_interactive.cpp +++ b/modules/interactive_music/audio_stream_interactive.cpp @@ -522,6 +522,7 @@ void AudioStreamInteractive::_bind_methods() { BIND_ENUM_CONSTANT(TRANSITION_TO_TIME_SAME_POSITION); BIND_ENUM_CONSTANT(TRANSITION_TO_TIME_START); + BIND_ENUM_CONSTANT(TRANSITION_TO_TIME_PREVIOUS_POSITION); BIND_ENUM_CONSTANT(FADE_DISABLED); BIND_ENUM_CONSTANT(FADE_IN); diff --git a/modules/interactive_music/doc_classes/AudioStreamInteractive.xml b/modules/interactive_music/doc_classes/AudioStreamInteractive.xml index 7200098db0..1da69624b9 100644 --- a/modules/interactive_music/doc_classes/AudioStreamInteractive.xml +++ b/modules/interactive_music/doc_classes/AudioStreamInteractive.xml @@ -199,6 +199,9 @@ Transition to the start of the destination clip. + + Transition to the last played position in the destination clip, if there was a previous transition from that clip. Otherwise, plays from the start of the destination clip. + Do not use fade for the transition. This is useful when transitioning from a clip-end to clip-beginning, and each clip has their begin/end.