[Bf-blender-cvs] [2206b6b9a04] blender-v3.0-release: Fix T92628: .blend thumbnail renders black with Cycles 3D viewport render

Brecht Van Lommel noreply at git.blender.org
Mon Nov 29 16:29:26 CET 2021


Commit: 2206b6b9a04777b7325c8f30a49db23bc9a61317
Author: Brecht Van Lommel
Date:   Mon Nov 29 15:25:39 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rB2206b6b9a04777b7325c8f30a49db23bc9a61317

Fix T92628: .blend thumbnail renders black with Cycles 3D viewport render

Don't use Cycles for rendering thumbnails, fall back to Solid shading.

Differential Revision: https://developer.blender.org/D13406

===================================================================

M	source/blender/editors/space_view3d/view3d_draw.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index fceb6553cab..4ab92a4470f 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2048,6 +2048,15 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph,
   }
   memcpy(&v3d.shading, source_shading_settings, sizeof(View3DShading));
 
+  if (drawtype == OB_RENDER) {
+    /* Don't use external engines for preview. Fall back to solid instead of Eevee as rendering
+     * with Eevee is potentially slow due to compiling shaders and loading textures, and the
+     * depsgraph may not have been updated to have all the right geometry attributes. */
+    if (!(BKE_scene_uses_blender_eevee(scene) || BKE_scene_uses_blender_workbench(scene))) {
+      drawtype = OB_SOLID;
+    }
+  }
+
   if (drawtype == OB_MATERIAL) {
     v3d.shading.flag = V3D_SHADING_SCENE_WORLD | V3D_SHADING_SCENE_LIGHTS;
     v3d.shading.render_pass = SCE_PASS_COMBINED;



More information about the Bf-blender-cvs mailing list