summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_track_editor_plugins.cpp24
-rw-r--r--editor/editor_settings.cpp3
-rw-r--r--editor/export/editor_export_platform_pc.cpp3
3 files changed, 13 insertions, 17 deletions
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 2895aa9710..be4a070213 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -847,9 +847,14 @@ bool AnimationTrackEditTypeAudio::is_key_selectable_by_distance() const {
void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) {
Ref<AudioStream> stream = get_animation()->audio_track_get_key_stream(get_track(), p_index);
-
if (!stream.is_valid()) {
- AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right);
+ AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); // Draw diamond.
+ return;
+ }
+
+ float len = stream->get_length();
+ if (len == 0) {
+ AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); // Draw diamond.
return;
}
@@ -871,16 +876,10 @@ void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
float fh = int(font->get_height(font_size) * 1.5);
- float len = stream->get_length();
-
Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream);
float preview_len = preview->get_length();
- if (len == 0) {
- len = preview_len;
- }
-
int pixel_total_len = len * p_pixels_sec;
len -= end_ofs;
@@ -1044,16 +1043,13 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
continue;
}
- float start_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), i);
- float end_ofs = get_animation()->audio_track_get_key_end_offset(get_track(), i);
float len = stream->get_length();
-
if (len == 0) {
- Ref<AudioStreamPreview> preview = AudioStreamPreviewGenerator::get_singleton()->generate_preview(stream);
- float preview_len = preview->get_length();
- len = preview_len;
+ continue;
}
+ float start_ofs = get_animation()->audio_track_get_key_start_offset(get_track(), i);
+ float end_ofs = get_animation()->audio_track_get_key_end_offset(get_track(), i);
len -= end_ofs;
len -= start_ofs;
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index dd84f3b9e1..23e32dcbd8 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -384,9 +384,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
if (score > 0 && score >= best_score) {
best = locale;
best_score = score;
- if (score == 10) {
- break; // Exact match, skip the rest.
- }
}
}
if (best_score == 0) {
diff --git a/editor/export/editor_export_platform_pc.cpp b/editor/export/editor_export_platform_pc.cpp
index bbfd73be5e..7f934bc45b 100644
--- a/editor/export/editor_export_platform_pc.cpp
+++ b/editor/export/editor_export_platform_pc.cpp
@@ -33,6 +33,9 @@
#include "core/config/project_settings.h"
void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
+ if (p_preset->get("texture_format/bptc")) {
+ r_features->push_back("bptc");
+ }
if (p_preset->get("texture_format/s3tc")) {
r_features->push_back("s3tc");
}