Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Merge pull request #95136 from Calinou/audio-interactive-transition-editor-hide-initial-clip

Thaddeus Crewsdd82d82b8d8d
diff --cc modules/interactive_music/audio_stream_interactive.cpp
index 77a81257d2b,0913694caba..d478181fc52
--- a/modules/interactive_music/audio_stream_interactive.cpp
+++ b/modules/interactive_music/audio_stream_interactive.cpp
@@@ -420,15 -422,19 +420,19 @@@ String AudioStreamInteractive::_get_str
void AudioStreamInteractive::_validate_property(PropertyInfo &r_property) const {
String prop = r_property.name;
+ if (Engine::get_singleton()->is_editor_hint() && prop == "switch_to") {
#ifdef TOOLS_ENABLED
- if (prop == "switch_to") {
r_property.hint_string = _get_streams_hint();
+#endif
return;
}
-#endif
- if (prop == "initial_clip") {
+ if (Engine::get_singleton()->is_editor_hint() && prop == "initial_clip") {
#ifdef TOOLS_ENABLED
+ if (get_clip_count() == 0) {
+ // Hide property since there's no clip to choose from.
+ r_property.usage = PROPERTY_USAGE_NO_EDITOR;
+ }
r_property.hint_string = _get_streams_hint();
#endif
} else if (prop.begins_with("clip_") && prop != "clip_count") {