Godot Engine – Multi-platform 2D and 3D game engine
Add String/StringName property hint for audio bus selection
Rémi Verschelde040a583189aa
diff --git a/core/core_constants.cpp b/core/core_constants.cppindex 3a43ea01396..3dbb5a0f9d1 100644--- a/core/core_constants.cpp+++ b/core/core_constants.cpp@@ -688,6 +688,7 @@ void register_global_constants() {BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_GROUP_ENABLE);BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_INPUT_NAME);BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_FILE_PATH);+ BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_AUDIO_BUS);BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_MAX);BIND_CORE_BITFIELD_FLAG(PROPERTY_USAGE_NONE);diff --git a/core/object/property_info.h b/core/object/property_info.hindex c672fab04ef..ebfa39269c7 100644--- a/core/object/property_info.h+++ b/core/object/property_info.h@@ -82,6 +82,7 @@ enum PropertyHint {PROPERTY_HINT_GROUP_ENABLE, ///< used to make the property's group checkable. Only use for boolean types.PROPERTY_HINT_INPUT_NAME,PROPERTY_HINT_FILE_PATH,+ PROPERTY_HINT_AUDIO_BUS,PROPERTY_HINT_MAX,};diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xmlindex cab37b3b3c7..4ba0576d61c 100644--- a/doc/classes/@GlobalScope.xml+++ b/doc/classes/@GlobalScope.xml@@ -3010,7 +3010,10 @@<constant name="PROPERTY_HINT_FILE_PATH" value="44" enum="PropertyHint">Like [constant PROPERTY_HINT_FILE], but the property is stored as a raw path, not UID. That means the reference will be broken if you move the file. Consider using [constant PROPERTY_HINT_FILE] when possible.</constant>- <constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint">+ <constant name="PROPERTY_HINT_AUDIO_BUS" value="45" enum="PropertyHint">+ Hints that a [String] or [StringName] property is the name of an audio bus. This allows the selection of predefined bus names registered with the audio server.+ </constant>+ <constant name="PROPERTY_HINT_MAX" value="46" enum="PropertyHint">Represents the size of the [enum PropertyHint] enum.</constant><constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags" is_bitfield="true">diff --git a/editor/inspector/editor_properties.cpp b/editor/inspector/editor_properties.cppindex ea186a5efd8..270e6b59c1a 100644--- a/editor/inspector/editor_properties.cpp+++ b/editor/inspector/editor_properties.cpp@@ -67,6 +67,7 @@#include "scene/resources/font.h"#include "scene/resources/mesh.h"#include "scene/resources/sky.h"+#include "servers/audio/audio_server.h"#include "servers/display/display_server.h"#include "modules/modules_enabled.gen.h"@@ -3964,7 +3965,7 @@ static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const Strireturn hint;}-static EditorProperty *get_input_action_editor(const String &p_hint_text, bool is_string_name) {+static EditorProperty *_get_input_action_editor(const String &p_hint_text, bool is_string_name) {// TODO: Should probably use a better editor GUI with a search bar.// Said GUI could also handle showing builtin options, requiring 1 less hint.EditorPropertyTextEnum *editor = memnew(EditorPropertyTextEnum);@@ -3996,6 +3997,16 @@ static EditorProperty *get_input_action_editor(const String &p_hint_text, bool ireturn editor;}+static EditorProperty *_get_audio_bus_editor(bool is_string_name) {+ EditorPropertyTextEnum *editor = memnew(EditorPropertyTextEnum);+ Vector<String> options;+ for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {+ options.append(AudioServer::get_singleton()->get_bus_name(i));+ }+ editor->setup(options, Vector<String>(), is_string_name, false);+ return editor;+}+EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {double default_float_step = EDITOR_GET("interface/inspector/default_float_step");@@ -4114,7 +4125,9 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_editor->setup(options, option_names, false, (p_hint == PROPERTY_HINT_ENUM_SUGGESTION));return editor;} else if (p_hint == PROPERTY_HINT_INPUT_NAME) {- return get_input_action_editor(p_hint_text, false);+ return _get_input_action_editor(p_hint_text, false);+ } else if (p_hint == PROPERTY_HINT_AUDIO_BUS) {+ return _get_audio_bus_editor(false);} else if (p_hint == PROPERTY_HINT_MULTILINE_TEXT) {Vector<String> options = p_hint_text.split(",", false);EditorPropertyMultilineText *editor = memnew(EditorPropertyMultilineText(false));@@ -4278,7 +4291,9 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_editor->setup(options, Vector<String>(), true, (p_hint == PROPERTY_HINT_ENUM_SUGGESTION));return editor;} else if (p_hint == PROPERTY_HINT_INPUT_NAME) {- return get_input_action_editor(p_hint_text, true);+ return _get_input_action_editor(p_hint_text, true);+ } else if (p_hint == PROPERTY_HINT_AUDIO_BUS) {+ return _get_audio_bus_editor(true);} else {EditorPropertyText *editor = memnew(EditorPropertyText);if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) {diff --git a/modules/gdscript/tests/scripts/utils.notest.gd b/modules/gdscript/tests/scripts/utils.notest.gdindex 3e87b6316d5..a0d61596aba 100644--- a/modules/gdscript/tests/scripts/utils.notest.gd+++ b/modules/gdscript/tests/scripts/utils.notest.gd@@ -216,6 +216,8 @@ static func get_property_hint_name(hint: PropertyHint) -> String:return "PROPERTY_HINT_INPUT_NAME"PROPERTY_HINT_FILE_PATH:return "PROPERTY_HINT_FILE_PATH"+ PROPERTY_HINT_AUDIO_BUS:+ return "PROPERTY_HINT_AUDIO_BUS"printerr("Argument `hint` is invalid. Use `PROPERTY_HINT_*` constants.")return "<invalid hint>"diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cppindex c69a3d54198..1a489035d46 100644--- a/scene/2d/audio_stream_player_2d.cpp+++ b/scene/2d/audio_stream_player_2d.cpp@@ -300,10 +300,6 @@ void AudioStreamPlayer2D::_set_playing(bool p_enable) {internal->set_playing(p_enable);}-void AudioStreamPlayer2D::_validate_property(PropertyInfo &p_property) const {- internal->validate_property(p_property);-}-void AudioStreamPlayer2D::set_max_distance(float p_pixels) {ERR_FAIL_COND(p_pixels <= 0.0);max_distance = p_pixels;@@ -445,7 +441,7 @@ void AudioStreamPlayer2D::_bind_methods() {ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation");ADD_PROPERTY(PropertyInfo(Variant::INT, "max_polyphony", PROPERTY_HINT_NONE, ""), "set_max_polyphony", "get_max_polyphony");ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "panning_strength", PROPERTY_HINT_RANGE, "0,3,0.01,or_greater"), "set_panning_strength", "get_panning_strength");- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_AUDIO_BUS), "set_bus", "get_bus");ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_type", PROPERTY_HINT_ENUM, "Default,Stream,Sample"), "set_playback_type", "get_playback_type");diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.hindex 39aab1d97eb..18f5b61a4c4 100644--- a/scene/2d/audio_stream_player_2d.h+++ b/scene/2d/audio_stream_player_2d.h@@ -77,7 +77,6 @@ private:float cached_global_panning_strength = 0.5f;protected:- void _validate_property(PropertyInfo &p_property) const;void _notification(int p_what);static void _bind_methods();diff --git a/scene/2d/physics/area_2d.cpp b/scene/2d/physics/area_2d.cppindex 4d8f8d06b2d..d48b20f498d 100644--- a/scene/2d/physics/area_2d.cpp+++ b/scene/2d/physics/area_2d.cpp@@ -548,18 +548,7 @@ void Area2D::_validate_property(PropertyInfo &p_property) const {if (!Engine::get_singleton()->is_editor_hint()) {return;}- if (p_property.name == "audio_bus_name") {- String options;- for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {- if (i > 0) {- options += ",";- }- String name = AudioServer::get_singleton()->get_bus_name(i);- options += name;- }-- p_property.hint_string = options;- } else if (p_property.name.begins_with("gravity") && p_property.name != "gravity_space_override") {+ if (p_property.name.begins_with("gravity") && p_property.name != "gravity_space_override") {if (gravity_space_override == SPACE_OVERRIDE_DISABLED) {p_property.usage = PROPERTY_USAGE_NO_EDITOR;} else {@@ -671,7 +660,7 @@ void Area2D::_bind_methods() {ADD_GROUP("Audio Bus", "audio_bus_");ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name");+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_AUDIO_BUS), "set_audio_bus_name", "get_audio_bus_name");BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cppindex a96f9479151..803270f807f 100644--- a/scene/3d/audio_stream_player_3d.cpp+++ b/scene/3d/audio_stream_player_3d.cpp@@ -709,10 +709,6 @@ void AudioStreamPlayer3D::_set_playing(bool p_enable) {internal->set_playing(p_enable);}-void AudioStreamPlayer3D::_validate_property(PropertyInfo &p_property) const {- internal->validate_property(p_property);-}-void AudioStreamPlayer3D::set_max_distance(float p_metres) {ERR_FAIL_COND(p_metres < 0.0);max_distance = p_metres;@@ -948,7 +944,7 @@ void AudioStreamPlayer3D::_bind_methods() {ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01,or_greater,suffix:m"), "set_max_distance", "get_max_distance");ADD_PROPERTY(PropertyInfo(Variant::INT, "max_polyphony", PROPERTY_HINT_NONE, ""), "set_max_polyphony", "get_max_polyphony");ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "panning_strength", PROPERTY_HINT_RANGE, "0,3,0.01,or_greater"), "set_panning_strength", "get_panning_strength");- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_AUDIO_BUS), "set_bus", "get_bus");ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_area_mask", "get_area_mask");ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_type", PROPERTY_HINT_ENUM, "Default,Stream,Sample"), "set_playback_type", "get_playback_type");ADD_GROUP("Emission Angle", "emission_angle");diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.hindex 1c58bbe5e94..63cf4dc219d 100644--- a/scene/3d/audio_stream_player_3d.h+++ b/scene/3d/audio_stream_player_3d.h@@ -130,7 +130,6 @@ private:HashMap<StringName, Vector<AudioFrame>> bus_volumes;protected:- void _validate_property(PropertyInfo &p_property) const;void _notification(int p_what);static void _bind_methods();diff --git a/scene/3d/physics/area_3d.cpp b/scene/3d/physics/area_3d.cppindex 01fc5ae88a1..c3f84ad6943 100644--- a/scene/3d/physics/area_3d.cpp+++ b/scene/3d/physics/area_3d.cpp@@ -652,18 +652,7 @@ void Area3D::_validate_property(PropertyInfo &p_property) const {if (!Engine::get_singleton()->is_editor_hint()) {return;}- if (p_property.name == "audio_bus_name" || p_property.name == "reverb_bus_name") {- String options;- for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {- if (i > 0) {- options += ",";- }- String name = AudioServer::get_singleton()->get_bus_name(i);- options += name;- }-- p_property.hint_string = options;- } else if (p_property.name.begins_with("gravity") && p_property.name != "gravity_space_override") {+ if (p_property.name.begins_with("gravity") && p_property.name != "gravity_space_override") {if (gravity_space_override == SPACE_OVERRIDE_DISABLED) {p_property.usage = PROPERTY_USAGE_NO_EDITOR;} else {@@ -801,11 +790,11 @@ void Area3D::_bind_methods() {ADD_GROUP("Audio Bus", "audio_bus_");ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus_name", "get_audio_bus_name");+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "audio_bus_name", PROPERTY_HINT_AUDIO_BUS), "set_audio_bus_name", "get_audio_bus_name");ADD_GROUP("Reverb Bus", "reverb_bus_");ADD_PROPERTY(PropertyInfo(Variant::BOOL, "reverb_bus_enabled", PROPERTY_HINT_GROUP_ENABLE), "set_use_reverb_bus", "is_using_reverb_bus");- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "reverb_bus_name", PROPERTY_HINT_ENUM, ""), "set_reverb_bus_name", "get_reverb_bus_name");+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "reverb_bus_name", PROPERTY_HINT_AUDIO_BUS), "set_reverb_bus_name", "get_reverb_bus_name");ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "reverb_bus_amount", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_amount", "get_reverb_amount");ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "reverb_bus_uniformity", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_reverb_uniformity", "get_reverb_uniformity");diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cppindex 9ad76f3b545..5c3fc466fcb 100644--- a/scene/audio/audio_stream_player.cpp+++ b/scene/audio/audio_stream_player.cpp@@ -218,10 +218,6 @@ Vector<AudioFrame> AudioStreamPlayer::_get_volume_vector() {return volume_vector;}-void AudioStreamPlayer::_validate_property(PropertyInfo &p_property) const {- internal->validate_property(p_property);-}-bool AudioStreamPlayer::has_stream_playback() {return internal->has_stream_playback();}@@ -290,7 +286,7 @@ void AudioStreamPlayer::_bind_methods() {ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_target", PROPERTY_HINT_ENUM, "Stereo,Surround,Center"), "set_mix_target", "get_mix_target");ADD_PROPERTY(PropertyInfo(Variant::INT, "max_polyphony", PROPERTY_HINT_NONE, ""), "set_max_polyphony", "get_max_polyphony");- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_AUDIO_BUS), "set_bus", "get_bus");ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_type", PROPERTY_HINT_ENUM, "Default,Stream,Sample"), "set_playback_type", "get_playback_type");ADD_SIGNAL(MethodInfo("finished"));diff --git a/scene/audio/audio_stream_player.h b/scene/audio/audio_stream_player.hindex 409a294e832..9fdf0a2186b 100644--- a/scene/audio/audio_stream_player.h+++ b/scene/audio/audio_stream_player.h@@ -59,7 +59,6 @@ private:Vector<AudioFrame> _get_volume_vector();protected:- void _validate_property(PropertyInfo &p_property) const;void _notification(int p_what);static void _bind_methods();diff --git a/scene/audio/audio_stream_player_internal.cpp b/scene/audio/audio_stream_player_internal.cppindex 4470c93be83..04057e15594 100644--- a/scene/audio/audio_stream_player_internal.cpp+++ b/scene/audio/audio_stream_player_internal.cpp@@ -201,24 +201,6 @@ bool AudioStreamPlayerInternal::get_stream_paused() const {return false;}-void AudioStreamPlayerInternal::validate_property(PropertyInfo &p_property) const {- if (!Engine::get_singleton()->is_editor_hint()) {- return;- }- if (p_property.name == "bus") {- String options;- for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {- if (i > 0) {- options += ",";- }- String name = AudioServer::get_singleton()->get_bus_name(i);- options += name;- }-- p_property.hint_string = options;- }-}-bool AudioStreamPlayerInternal::set(const StringName &p_name, const Variant &p_value) {ParameterData *pd = playback_parameters.getptr(p_name);if (!pd) {diff --git a/scene/audio/audio_stream_player_internal.h b/scene/audio/audio_stream_player_internal.hindex 6efe1af31fe..15f306ee7c0 100644--- a/scene/audio/audio_stream_player_internal.h+++ b/scene/audio/audio_stream_player_internal.h@@ -79,7 +79,6 @@ public:void ensure_playback_limit();void notification(int p_what);- void validate_property(PropertyInfo &p_property) const;bool set(const StringName &p_name, const Variant &p_value);bool get(const StringName &p_name, Variant &r_ret) const;void get_property_list(List<PropertyInfo> *p_list) const;diff --git a/scene/gui/video_stream_player.cpp b/scene/gui/video_stream_player.cppindex 19e04796593..c0d8e2906fa 100644--- a/scene/gui/video_stream_player.cpp+++ b/scene/gui/video_stream_player.cpp@@ -507,24 +507,6 @@ StringName VideoStreamPlayer::get_bus() const {return SceneStringName(Master);}-void VideoStreamPlayer::_validate_property(PropertyInfo &p_property) const {- if (!Engine::get_singleton()->is_editor_hint()) {- return;- }- if (p_property.name == "bus") {- String options;- for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {- if (i > 0) {- options += ",";- }- String name = AudioServer::get_singleton()->get_bus_name(i);- options += name;- }-- p_property.hint_string = options;- }-}-void VideoStreamPlayer::_bind_methods() {ClassDB::bind_method(D_METHOD("set_stream", "stream"), &VideoStreamPlayer::set_stream);ClassDB::bind_method(D_METHOD("get_stream"), &VideoStreamPlayer::get_stream);@@ -586,7 +568,7 @@ void VideoStreamPlayer::_bind_methods() {ADD_PROPERTY(PropertyInfo(Variant::INT, "buffering_msec", PROPERTY_HINT_RANGE, "10,1000,suffix:ms"), "set_buffering_msec", "get_buffering_msec");ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stream_position", PROPERTY_HINT_RANGE, "0,1280000,0.1", PROPERTY_USAGE_NONE), "set_stream_position", "get_stream_position");- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_AUDIO_BUS), "set_bus", "get_bus");}VideoStreamPlayer::~VideoStreamPlayer() {diff --git a/scene/gui/video_stream_player.h b/scene/gui/video_stream_player.hindex 76c9797b6a5..3d720f047d9 100644--- a/scene/gui/video_stream_player.h+++ b/scene/gui/video_stream_player.h@@ -73,7 +73,6 @@ class VideoStreamPlayer : public Control {protected:static void _bind_methods();void _notification(int p_notification);- void _validate_property(PropertyInfo &p_property) const;public:Size2 get_minimum_size() const override;diff --git a/servers/audio/effects/audio_effect_compressor.cpp b/servers/audio/effects/audio_effect_compressor.cppindex 943b8f7e46b..e99f006086b 100644--- a/servers/audio/effects/audio_effect_compressor.cpp+++ b/servers/audio/effects/audio_effect_compressor.cpp@@ -30,7 +30,6 @@#include "audio_effect_compressor.h"-#include "core/config/engine.h"#include "core/object/class_db.h"#include "servers/audio/audio_server.h"@@ -187,21 +186,6 @@ StringName AudioEffectCompressor::get_sidechain() const {return sidechain;}-void AudioEffectCompressor::_validate_property(PropertyInfo &p_property) const {- if (!Engine::get_singleton()->is_editor_hint()) {- return;- }- if (p_property.name == "sidechain") {- String buses = "";- for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {- buses += ",";- buses += AudioServer::get_singleton()->get_bus_name(i);- }-- p_property.hint_string = buses;- }-}-void AudioEffectCompressor::_bind_methods() {ClassDB::bind_method(D_METHOD("set_threshold", "threshold"), &AudioEffectCompressor::set_threshold);ClassDB::bind_method(D_METHOD("get_threshold"), &AudioEffectCompressor::get_threshold);@@ -230,7 +214,7 @@ void AudioEffectCompressor::_bind_methods() {ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attack_us", PROPERTY_HINT_RANGE, U"20,2000,1,suffix:\u00B5s"), "set_attack_us", "get_attack_us");ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "release_ms", PROPERTY_HINT_RANGE, "20,2000,1,suffix:ms"), "set_release_ms", "get_release_ms");ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mix", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_mix", "get_mix");- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "sidechain", PROPERTY_HINT_ENUM), "set_sidechain", "get_sidechain");+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "sidechain", PROPERTY_HINT_AUDIO_BUS), "set_sidechain", "get_sidechain");}AudioEffectCompressor::AudioEffectCompressor() {diff --git a/servers/audio/effects/audio_effect_compressor.h b/servers/audio/effects/audio_effect_compressor.hindex 96b6ec2df69..13bb114ea04 100644--- a/servers/audio/effects/audio_effect_compressor.h+++ b/servers/audio/effects/audio_effect_compressor.h@@ -60,7 +60,6 @@ class AudioEffectCompressor : public AudioEffect {StringName sidechain;protected:- void _validate_property(PropertyInfo &p_property) const;static void _bind_methods();public: