diff options
Diffstat (limited to 'source/blender/render/intern/source/pipeline.c')
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 60 |
1 files changed, 40 insertions, 20 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 32bd67cb1f2..7b43c77537f 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -699,25 +699,27 @@ static void render_result_rescale(Render *re) RR_USE_MEM, RR_ALL_LAYERS); - dst_rectf = re->result->rectf; - if (dst_rectf == NULL) { - RenderLayer *rl; - rl = render_get_active_layer(re, re->result); - if (rl != NULL) { - dst_rectf = rl->rectf; + if (re->result != NULL) { + dst_rectf = re->result->rectf; + if (dst_rectf == NULL) { + RenderLayer *rl; + rl = render_get_active_layer(re, re->result); + if (rl != NULL) { + dst_rectf = rl->rectf; + } } - } - scale_x = (float) result->rectx / re->result->rectx; - scale_y = (float) result->recty / re->result->recty; - for (x = 0; x < re->result->rectx; ++x) { - for (y = 0; y < re->result->recty; ++y) { - int src_x = x * scale_x, - src_y = y * scale_y; - int dst_index = y * re->result->rectx + x, - src_index = src_y * result->rectx + src_x; - copy_v4_v4(dst_rectf + dst_index * 4, - src_rectf + src_index * 4); + scale_x = (float) result->rectx / re->result->rectx; + scale_y = (float) result->recty / re->result->recty; + for (x = 0; x < re->result->rectx; ++x) { + for (y = 0; y < re->result->recty; ++y) { + int src_x = x * scale_x, + src_y = y * scale_y; + int dst_index = y * re->result->rectx + x, + src_index = src_y * result->rectx + src_x; + copy_v4_v4(dst_rectf + dst_index * 4, + src_rectf + src_index * 4); + } } } } @@ -1013,8 +1015,8 @@ static bool find_next_pano_slice(Render *re, int *slice, int *minx, rctf *viewpl /* rotate database according to part coordinates */ project_renderdata(re, projectverto, 1, -R.panodxp * phi, 1); - R.panosi = sin(R.panodxp * phi); - R.panoco = cos(R.panodxp * phi); + R.panosi = sinf(R.panodxp * phi); + R.panoco = cosf(R.panodxp * phi); } (*slice)++; @@ -1638,6 +1640,10 @@ static void do_render_fields_blur_3d(Render *re) if (re->r.mode & R_BORDER) { if ((re->r.mode & R_CROP) == 0) { RenderResult *rres; + + /* backup */ + const rcti orig_disprect = re->disprect; + const int orig_rectx = re->rectx, orig_recty = re->recty; BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE); @@ -1660,6 +1666,11 @@ static void do_render_fields_blur_3d(Render *re) re->display_init(re->dih, re->result); re->display_update(re->duh, re->result, NULL); + + /* restore the disprect from border */ + re->disprect = orig_disprect; + re->rectx = orig_rectx; + re->recty = orig_recty; } else { /* set offset (again) for use in compositor, disprect was manipulated. */ @@ -2651,7 +2662,16 @@ bool RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList * } #endif } - + +#ifdef WITH_FREESTYLE + if (scene->r.mode & R_EDGE_FRS) { + if (scene->r.mode & R_FIELDS) { + BKE_report(reports, RPT_ERROR, "Fields not supported in Freestyle"); + return false; + } + } +#endif + /* layer flag tests */ if (!render_scene_has_layers_to_render(scene)) { BKE_report(reports, RPT_ERROR, "All render layers are disabled"); |