diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-11-29 18:59:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-11-29 18:59:09 +0300 |
commit | aff6227412580c64914f1dd1585b56382ec440d0 (patch) | |
tree | 8fdf7b3f561d038135166248a777ac9ec8ad4186 | |
parent | f613c4c0953ebaf993ecd55b12bab9cf2196dac4 (diff) | |
parent | dae9917915c4e0dc2a7b382cbed756538439d59b (diff) |
Merge branch 'blender-v3.0-release'
-rw-r--r-- | source/blender/blenkernel/intern/displist.cc | 4 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 9 |
3 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc index f511bb2b65e..73aea944665 100644 --- a/source/blender/blenkernel/intern/displist.cc +++ b/source/blender/blenkernel/intern/displist.cc @@ -1526,9 +1526,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph, ob->runtime.geometry_set_eval = new GeometrySet(std::move(geometry)); } - if (ob->runtime.bb) { - ob->runtime.bb->flag |= BOUNDBOX_DIRTY; - } + BKE_object_boundbox_calc_from_evaluated_geometry(ob); } void BKE_displist_minmax(const ListBase *dispbase, float min[3], float max[3]) diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 25353dc30fe..e60e5e52187 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -1764,6 +1764,10 @@ static void icon_preview_free(void *customdata) */ bool ED_preview_id_is_supported(const ID *id) { + if (id == NULL) { + return false; + } + if (GS(id->name) == ID_OB) { return object_preview_is_type_supported((const Object *)id); } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 6f6fa8b7576..5639a498d8a 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2046,6 +2046,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; |