diff options
author | Maxim Sheronov <maxim.sheronov@gmail.com> | 2017-09-12 22:09:06 +0300 |
---|---|---|
committer | Maxim Sheronov <maxim.sheronov@gmail.com> | 2017-09-13 20:57:07 +0300 |
commit | 0fffa45158bebeb4aaba1df1d271c000fffbe7f7 (patch) | |
tree | 369918b0d7c9f367a7396c3584ac84ab550bd103 /servers | |
parent | 69017974beb16dcfa971f9b6f33a4f005be57bef (diff) |
Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
Diffstat (limited to 'servers')
-rw-r--r-- | servers/audio/effects/audio_effect_distortion.cpp | 6 | ||||
-rw-r--r-- | servers/audio/effects/audio_effect_filter.cpp | 5 | ||||
-rw-r--r-- | servers/audio_server.cpp | 4 | ||||
-rw-r--r-- | servers/physics_server.cpp | 14 |
4 files changed, 29 insertions, 0 deletions
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp index f2bcabc3cb..3e6280f033 100644 --- a/servers/audio/effects/audio_effect_distortion.cpp +++ b/servers/audio/effects/audio_effect_distortion.cpp @@ -175,6 +175,12 @@ void AudioEffectDistortion::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "keep_hf_hz", PROPERTY_HINT_RANGE, "1,20000,1"), "set_keep_hf_hz", "get_keep_hf_hz"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "drive", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_drive", "get_drive"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "post_gain", PROPERTY_HINT_RANGE, "-80,24,0.01"), "set_post_gain", "get_post_gain"); + + BIND_ENUM_CONSTANT(MODE_CLIP); + BIND_ENUM_CONSTANT(MODE_ATAN); + BIND_ENUM_CONSTANT(MODE_LOFI); + BIND_ENUM_CONSTANT(MODE_OVERDRIVE); + BIND_ENUM_CONSTANT(MODE_WAVESHAPE); } AudioEffectDistortion::AudioEffectDistortion() { diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp index 64a9db51a5..019494c74a 100644 --- a/servers/audio/effects/audio_effect_filter.cpp +++ b/servers/audio/effects/audio_effect_filter.cpp @@ -159,6 +159,11 @@ void AudioEffectFilter::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain"); ADD_PROPERTY(PropertyInfo(Variant::INT, "dB", PROPERTY_HINT_ENUM, "6db,12db,18db,24db"), "set_db", "get_db"); + + BIND_ENUM_CONSTANT(FILTER_6DB); + BIND_ENUM_CONSTANT(FILTER_12DB); + BIND_ENUM_CONSTANT(FILTER_18DB); + BIND_ENUM_CONSTANT(FILTER_24DB); } AudioEffectFilter::AudioEffectFilter(AudioFilterSW::Mode p_mode) { diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 29014a7ced..8f9d59a440 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -1081,6 +1081,10 @@ void AudioServer::_bind_methods() { ClassDB::bind_method(D_METHOD("generate_bus_layout"), &AudioServer::generate_bus_layout); ADD_SIGNAL(MethodInfo("bus_layout_changed")); + + BIND_ENUM_CONSTANT(SPEAKER_MODE_STEREO); + BIND_ENUM_CONSTANT(SPEAKER_SURROUND_51); + BIND_ENUM_CONSTANT(SPEAKER_SURROUND_71); } AudioServer::AudioServer() { diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index d4e37be882..28ab31b8f6 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -704,6 +704,20 @@ void PhysicsServer::_bind_methods() { BIND_ENUM_CONSTANT(INFO_ACTIVE_OBJECTS); BIND_ENUM_CONSTANT(INFO_COLLISION_PAIRS); BIND_ENUM_CONSTANT(INFO_ISLAND_COUNT); + + BIND_ENUM_CONSTANT(SPACE_PARAM_CONTACT_RECYCLE_RADIUS); + BIND_ENUM_CONSTANT(SPACE_PARAM_CONTACT_MAX_SEPARATION); + BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION); + BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD); + BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD); + BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP); + BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO); + BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS); + + BIND_ENUM_CONSTANT(BODY_AXIS_LOCK_DISABLED); + BIND_ENUM_CONSTANT(BODY_AXIS_LOCK_X); + BIND_ENUM_CONSTANT(BODY_AXIS_LOCK_Y); + BIND_ENUM_CONSTANT(BODY_AXIS_LOCK_Z); } PhysicsServer::PhysicsServer() { |