diff options
Diffstat (limited to 'source/blender/render/intern/source/render_result.c')
-rw-r--r-- | source/blender/render/intern/source/render_result.c | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c index 1b19307b9e8..53169c256a9 100644 --- a/source/blender/render/intern/source/render_result.c +++ b/source/blender/render/intern/source/render_result.c @@ -264,7 +264,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf RenderResult *rr; RenderLayer *rl; RenderView *rv; - SceneLayer *scene_layer; + ViewLayer *view_layer; int rectx, recty; int nr; @@ -294,19 +294,19 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf render_result_views_new(rr, &re->r); /* check renderdata for amount of layers */ - for (nr = 0, scene_layer = re->render_layers.first; scene_layer; scene_layer = scene_layer->next, nr++) { + for (nr = 0, view_layer = re->view_layers.first; view_layer; view_layer = view_layer->next, nr++) { if (layername && layername[0]) - if (!STREQ(scene_layer->name, layername)) + if (!STREQ(view_layer->name, layername)) continue; if (re->r.scemode & R_SINGLE_LAYER) { - if (nr != re->active_layer) { + if (nr != re->active_view_layer) { continue; } } else { - if ((scene_layer->flag & SCENE_LAYER_RENDER) == 0) { + if ((view_layer->flag & VIEW_LAYER_RENDER) == 0) { continue; } } @@ -314,10 +314,10 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf rl = MEM_callocN(sizeof(RenderLayer), "new render layer"); BLI_addtail(&rr->layers, rl); - BLI_strncpy(rl->name, scene_layer->name, sizeof(rl->name)); - rl->layflag = scene_layer->layflag; - rl->passflag = scene_layer->passflag; /* for debugging: scene_layer->passflag | SCE_PASS_RAYHITS; */ - rl->pass_xor = scene_layer->pass_xor; + BLI_strncpy(rl->name, view_layer->name, sizeof(rl->name)); + rl->layflag = view_layer->layflag; + rl->passflag = view_layer->passflag; /* for debugging: view_layer->passflag | SCE_PASS_RAYHITS; */ + rl->pass_xor = view_layer->pass_xor; rl->rectx = rectx; rl->recty = recty; @@ -352,65 +352,65 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf /* a renderlayer should always have a Combined pass*/ render_layer_add_pass(rr, rl, 4, "Combined", view, "RGBA"); - if (scene_layer->passflag & SCE_PASS_Z) + if (view_layer->passflag & SCE_PASS_Z) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 1, RE_PASSNAME_Z, view, "Z"); - if (scene_layer->passflag & SCE_PASS_VECTOR) + if (view_layer->passflag & SCE_PASS_VECTOR) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 4, RE_PASSNAME_VECTOR, view, "XYZW"); - if (scene_layer->passflag & SCE_PASS_NORMAL) + if (view_layer->passflag & SCE_PASS_NORMAL) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_NORMAL, view, "XYZ"); - if (scene_layer->passflag & SCE_PASS_UV) + if (view_layer->passflag & SCE_PASS_UV) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_UV, view, "UVA"); - if (scene_layer->passflag & SCE_PASS_RGBA) + if (view_layer->passflag & SCE_PASS_RGBA) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 4, RE_PASSNAME_RGBA, view, "RGBA"); - if (scene_layer->passflag & SCE_PASS_EMIT) + if (view_layer->passflag & SCE_PASS_EMIT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_EMIT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_DIFFUSE) + if (view_layer->passflag & SCE_PASS_DIFFUSE) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_DIFFUSE, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_SPEC) + if (view_layer->passflag & SCE_PASS_SPEC) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_SPEC, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_AO) + if (view_layer->passflag & SCE_PASS_AO) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_AO, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_ENVIRONMENT) + if (view_layer->passflag & SCE_PASS_ENVIRONMENT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_ENVIRONMENT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_INDIRECT) + if (view_layer->passflag & SCE_PASS_INDIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_INDIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_SHADOW) + if (view_layer->passflag & SCE_PASS_SHADOW) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_SHADOW, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_REFLECT) + if (view_layer->passflag & SCE_PASS_REFLECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_REFLECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_REFRACT) + if (view_layer->passflag & SCE_PASS_REFRACT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_REFRACT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_INDEXOB) + if (view_layer->passflag & SCE_PASS_INDEXOB) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 1, RE_PASSNAME_INDEXOB, view, "X"); - if (scene_layer->passflag & SCE_PASS_INDEXMA) + if (view_layer->passflag & SCE_PASS_INDEXMA) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 1, RE_PASSNAME_INDEXMA, view, "X"); - if (scene_layer->passflag & SCE_PASS_MIST) + if (view_layer->passflag & SCE_PASS_MIST) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 1, RE_PASSNAME_MIST, view, "Z"); if (rl->passflag & SCE_PASS_RAYHITS) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 4, RE_PASSNAME_RAYHITS, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_DIFFUSE_DIRECT) + if (view_layer->passflag & SCE_PASS_DIFFUSE_DIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_DIFFUSE_DIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_DIFFUSE_INDIRECT) + if (view_layer->passflag & SCE_PASS_DIFFUSE_INDIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_DIFFUSE_INDIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_DIFFUSE_COLOR) + if (view_layer->passflag & SCE_PASS_DIFFUSE_COLOR) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_DIFFUSE_COLOR, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_GLOSSY_DIRECT) + if (view_layer->passflag & SCE_PASS_GLOSSY_DIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_GLOSSY_DIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_GLOSSY_INDIRECT) + if (view_layer->passflag & SCE_PASS_GLOSSY_INDIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_GLOSSY_INDIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_GLOSSY_COLOR) + if (view_layer->passflag & SCE_PASS_GLOSSY_COLOR) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_GLOSSY_COLOR, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_TRANSM_DIRECT) + if (view_layer->passflag & SCE_PASS_TRANSM_DIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_TRANSM_DIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_TRANSM_INDIRECT) + if (view_layer->passflag & SCE_PASS_TRANSM_INDIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_TRANSM_INDIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_TRANSM_COLOR) + if (view_layer->passflag & SCE_PASS_TRANSM_COLOR) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_TRANSM_COLOR, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_SUBSURFACE_DIRECT) + if (view_layer->passflag & SCE_PASS_SUBSURFACE_DIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_SUBSURFACE_DIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_SUBSURFACE_INDIRECT) + if (view_layer->passflag & SCE_PASS_SUBSURFACE_INDIRECT) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_SUBSURFACE_INDIRECT, view, "RGB"); - if (scene_layer->passflag & SCE_PASS_SUBSURFACE_COLOR) + if (view_layer->passflag & SCE_PASS_SUBSURFACE_COLOR) RENDER_LAYER_ADD_PASS_SAFE(rr, rl, 3, RE_PASSNAME_SUBSURFACE_COLOR, view, "RGB"); #undef RENDER_LAYER_ADD_PASS_SAFE } @@ -447,7 +447,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf rl->layflag = 0x7FFF; /* solid ztra halo strand */ rl->passflag = SCE_PASS_COMBINED; - re->active_layer = 0; + re->active_view_layer = 0; } /* border render; calculate offset for use in compositor. compo is centralized coords */ @@ -978,7 +978,7 @@ void render_result_single_layer_begin(Render *re) /* if scemode is R_SINGLE_LAYER, at end of rendering, merge the both render results */ void render_result_single_layer_end(Render *re) { - SceneLayer *scene_layer; + ViewLayer *view_layer; RenderLayer *rlpush; RenderLayer *rl; int nr; @@ -999,12 +999,12 @@ void render_result_single_layer_end(Render *re) BLI_remlink(&re->result->layers, rl); /* reconstruct render result layers */ - for (nr = 0, scene_layer = re->render_layers.first; scene_layer; scene_layer = scene_layer->next, nr++) { - if (nr == re->active_layer) { + for (nr = 0, view_layer = re->view_layers.first; view_layer; view_layer = view_layer->next, nr++) { + if (nr == re->active_view_layer) { BLI_addtail(&re->result->layers, rl); } else { - rlpush = RE_GetRenderLayer(re->pushedresult, scene_layer->name); + rlpush = RE_GetRenderLayer(re->pushedresult, view_layer->name); if (rlpush) { BLI_remlink(&re->pushedresult->layers, rlpush); BLI_addtail(&re->result->layers, rlpush); |