Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2019-04-25 17:24:06 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-04-30 15:01:22 +0300
commitd1f6ea2793d2b756b4f903f3ee7d09a90cf11890 (patch)
tree29a7b2954f6408afa682d446eaf433692c432528 /source/blender/editors/space_view3d/view3d_draw.c
parent3e780507bd613d2b7e2ca3de178bf8108dcae9bc (diff)
Sequencer: Scene Strip Performance
- Merged SEQ_OFSDRAW with V3D_OFSDRAW and define in the DNA_view3d_types: Due to this FSAA always kicked in making the rendering slow. - Removed `Texture Solid` and `DOF`. - Now when chosing Solid rendering the settings of the original scene is used. - Added a global override to use scene specific shading. In the Future we will need to enhanced this so user can change the settings. - Added support for LookDev. LookDev crashed as it needed the `evil_C` what was not set - LookDev mode will always show the scene + world lights. Reviewed By: brecht, fclem Maniphest Tasks: T62517 Differential Revision: https://developer.blender.org/D4738
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 12ce793e3ef..3cd4c65e65d 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1824,6 +1824,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph,
*/
ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph,
Scene *scene,
+ View3DShading *shading_override,
int drawtype,
Object *camera,
int width,
@@ -1846,22 +1847,25 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph,
ar.regiontype = RGN_TYPE_WINDOW;
v3d.camera = camera;
+ View3DShading *source_shading_settings = &scene->display.shading;
+ if (draw_flags & V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS && shading_override != NULL) {
+ source_shading_settings = shading_override;
+ }
+ memcpy(&v3d.shading, source_shading_settings, sizeof(View3DShading));
v3d.shading.type = drawtype;
+
+ if (drawtype == OB_MATERIAL) {
+ v3d.shading.flag = V3D_SHADING_SCENE_WORLD | V3D_SHADING_SCENE_LIGHTS;
+ }
+
v3d.flag2 = V3D_HIDE_OVERLAYS;
- if (draw_flags & V3D_OFSDRAW_USE_GPENCIL) {
+ if (draw_flags & V3D_OFSDRAW_SHOW_ANNOTATION) {
v3d.flag2 |= V3D_SHOW_ANNOTATION;
}
v3d.shading.background_type = V3D_SHADING_BACKGROUND_WORLD;
- if (draw_flags & V3D_OFSDRAW_USE_CAMERA_DOF) {
- if (camera->type == OB_CAMERA) {
- v3d.fx_settings.dof = &((Camera *)camera->data)->gpu_dof;
- v3d.fx_settings.fx_flag |= GPU_FX_FLAG_DOF;
- }
- }
-
rv3d.persp = RV3D_CAMOB;
copy_m4_m4(rv3d.viewinv, v3d.camera->obmat);