diff options
Diffstat (limited to 'source/blender/render/intern/pipeline.c')
-rw-r--r-- | source/blender/render/intern/pipeline.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index 6c06cd663fa..1c42467bc3d 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -87,8 +87,6 @@ # include "FRS_freestyle.h" #endif -#include "DEG_depsgraph.h" - /* internal */ #include "pipeline.h" #include "render_result.h" @@ -983,7 +981,7 @@ static void render_result_uncrop(Render *re) render_result_free(re->result); re->result = rres; - /* weak... the display callback wants an active renderlayer pointer... */ + /* Weak, the display callback wants an active render-layer pointer. */ re->result->renlay = render_get_active_layer(re, re->result); BLI_rw_mutex_unlock(&re->resultmutex); @@ -1038,8 +1036,7 @@ static void do_render_compositor_scene(Render *re, Scene *sce, int cfra) /* exception: scene uses own size (unfinished code) */ if (0) { - winx = (sce->r.size * sce->r.xsch) / 100; - winy = (sce->r.size * sce->r.ysch) / 100; + BKE_render_resolution(&sce->r, false, &winx, &winy); } /* initial setup */ @@ -1224,7 +1221,7 @@ static void do_render_compositor(Render *re) } } - /* weak... the display callback wants an active renderlayer pointer... */ + /* Weak: the display callback wants an active render-layer pointer. */ if (re->result != NULL) { re->result->renlay = render_get_active_layer(re, re->result); re->display_update(re->duh, re->result, NULL); @@ -1315,8 +1312,8 @@ static void do_render_sequencer(Render *re) true, &context); - /* the renderresult gets destroyed during the rendering, so we first collect all ibufs - * and then we populate the final renderesult */ + /* The render-result gets destroyed during the rendering, so we first collect all ibufs + * and then we populate the final render-result. */ for (view_id = 0; view_id < tot_views; view_id++) { context.view_id = view_id; @@ -1677,8 +1674,7 @@ static int render_init_from_main(Render *re, * r.border is the clipping rect */ /* calculate actual render result and display size */ - winx = (rd->size * rd->xsch) / 100; - winy = (rd->size * rd->ysch) / 100; + BKE_render_resolution(rd, false, &winx, &winy); /* We always render smaller part, inserting it in larger image is compositor business, * it uses 'disprect' for it. */ @@ -2411,8 +2407,7 @@ void RE_PreviewRender(Render *re, Main *bmain, Scene *sce) Object *camera; int winx, winy; - winx = (sce->r.size * sce->r.xsch) / 100; - winy = (sce->r.size * sce->r.ysch) / 100; + BKE_render_resolution(&sce->r, false, &winx, &winy); RE_InitState(re, NULL, &sce->r, &sce->view_layers, NULL, winx, winy, NULL); @@ -2441,8 +2436,7 @@ bool RE_ReadRenderResult(Scene *scene, Scene *scenode) rcti disprect; /* calculate actual render result and display size */ - winx = (scene->r.size * scene->r.xsch) / 100; - winy = (scene->r.size * scene->r.ysch) / 100; + BKE_render_resolution(&scene->r, false, &winx, &winy); /* only in movie case we render smaller part */ if (scene->r.mode & R_BORDER) { |