Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw.c
| Show First 20 Lines • Show All 2,042 Lines • ▼ Show 20 Lines | ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph, | ||||||||
| v3d.camera = camera; | v3d.camera = camera; | ||||||||
| View3DShading *source_shading_settings = &scene->display.shading; | View3DShading *source_shading_settings = &scene->display.shading; | ||||||||
| if (draw_flags & V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS && shading_override != NULL) { | if (draw_flags & V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS && shading_override != NULL) { | ||||||||
| source_shading_settings = shading_override; | source_shading_settings = shading_override; | ||||||||
| } | } | ||||||||
| memcpy(&v3d.shading, source_shading_settings, sizeof(View3DShading)); | memcpy(&v3d.shading, source_shading_settings, sizeof(View3DShading)); | ||||||||
| if (drawtype == OB_RENDER) { | |||||||||
| /* Don't use external engines for preview. Fall back to solid as rendering with Eevee is | |||||||||
sergeyUnsubmitted Not Done Inline Actions
sergey: | |||||||||
| * 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) { | if (drawtype == OB_MATERIAL) { | ||||||||
| v3d.shading.flag = V3D_SHADING_SCENE_WORLD | V3D_SHADING_SCENE_LIGHTS; | v3d.shading.flag = V3D_SHADING_SCENE_WORLD | V3D_SHADING_SCENE_LIGHTS; | ||||||||
| v3d.shading.render_pass = SCE_PASS_COMBINED; | v3d.shading.render_pass = SCE_PASS_COMBINED; | ||||||||
| } | } | ||||||||
| else if (drawtype == OB_RENDER) { | else if (drawtype == OB_RENDER) { | ||||||||
| v3d.shading.flag = V3D_SHADING_SCENE_WORLD_RENDER | V3D_SHADING_SCENE_LIGHTS_RENDER; | v3d.shading.flag = V3D_SHADING_SCENE_WORLD_RENDER | V3D_SHADING_SCENE_LIGHTS_RENDER; | ||||||||
| v3d.shading.render_pass = SCE_PASS_COMBINED; | v3d.shading.render_pass = SCE_PASS_COMBINED; | ||||||||
| } | } | ||||||||
| ▲ Show 20 Lines • Show All 587 Lines • Show Last 20 Lines | |||||||||