summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaptainProton42 <john.wigg@gmx.net>2021-03-19 20:54:29 +0100
committerCaptainProton42 <john.wigg@gmx.net>2021-05-04 16:40:26 +0200
commit16304aaa3b381cfe391acbb6ab884e3f9596bff1 (patch)
tree4292b5f7ff7a8cd70313db4973f2777dedead9ae
parentc26cff7885b24218b987ed49932688c8c086b57c (diff)
Fix 3D scene preview generation.
File system dock previews will now be generated for 3D scenes when no editor feature profile is set.
-rw-r--r--editor/editor_node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 0f0b2da6ab..8eeabf9cfd 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1408,8 +1408,9 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
} else {
// The 3D editor may be disabled as a feature, but scenes can still be opened.
// This check prevents the preview from regenerating in case those scenes are then saved.
+ // The preview will be generated if no feature profile is set (as the 3D editor is enabled by default).
Ref<EditorFeatureProfile> profile = feature_profile_manager->get_current_profile();
- if (profile.is_valid() && !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D)) {
+ if (!profile.is_valid() || !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D)) {
img = Node3DEditor::get_singleton()->get_editor_viewport(0)->get_viewport_node()->get_texture()->get_image();
}
}