Skip to content

Commit

Permalink
Fix 3D scene preview generation.
Browse files Browse the repository at this point in the history
File system dock previews will now be generated for 3D scenes when no
editor feature profile is set.
  • Loading branch information
CaptainProton42 committed May 4, 2021
1 parent c26cff7 commit 16304aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 16304aa

Please sign in to comment.