diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-02-15 20:37:59 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-02-15 21:29:09 +0300 |
commit | a428daada080771c75bb2003f60792dfea5f2121 (patch) | |
tree | 40430414b7032024e205e9f53c5e7e1c5c574cbd /source/blender/editors | |
parent | 883ef2c9cef5b25fb2da9233181e07cd2555c444 (diff) |
Layers: Separate between scene render layer (F12) and context render layer (everything else)
For now they are the same. However with workspaces they will be
different, and should be treated differently.
Diffstat (limited to 'source/blender/editors')
4 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 986e9623fef..490182b17ed 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -653,7 +653,7 @@ void SCENE_OT_render_layer_add(wmOperatorType *ot) static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - SceneLayer *sl = BKE_scene_layer_active(scene); + SceneLayer *sl = BKE_scene_layer_context_active(scene); if (!BKE_scene_layer_remove(CTX_data_main(C), scene, sl)) { return OPERATOR_CANCELLED; diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 34213d3d565..3727c29d9d0 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -181,8 +181,8 @@ static int buttons_context_path_object(ButsContextPath *path) /* if we have a scene, use the scene's active object */ else if (buttons_context_path_scene(path)) { scene = path->ptr[path->len - 1].data; - TODO_LAYER_CONTEXT; /* use context, not active one */ - SceneLayer *sl = BKE_scene_layer_active(scene); + + SceneLayer *sl = BKE_scene_layer_context_active(scene); ob = (sl->basact) ? sl->basact->object : NULL; if (ob) { diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 1ba33970aad..bbabb9e2d7a 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1849,7 +1849,7 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops outliner_add_orphaned_datablocks(mainvar, soops); } else if (soops->outlinevis == SO_COLLECTIONS) { - outliner_add_collections(soops, BLI_findlink(&scene->render_layers, scene->active_layer), scene); + outliner_add_collections(soops, BKE_scene_layer_context_active(scene), scene); } else { ten = outliner_add_element(soops, &soops->tree, OBACT_NEW, NULL, 0, 0); diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c index d23b2ac23c1..c4d980ec7e9 100644 --- a/source/blender/editors/space_view3d/view3d_draw_legacy.c +++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c @@ -1259,8 +1259,7 @@ void ED_view3d_draw_depth(Scene *scene, ARegion *ar, View3D *v3d, bool alphaover short flag = v3d->flag; float glalphaclip = U.glalphaclip; int obcenter_dia = U.obcenter_dia; - TODO_LAYER_CONTEXT; /* we should pass context, really */ - SceneLayer *sl = BKE_scene_layer_active(scene); + SceneLayer *sl = BKE_scene_layer_context_active(scene); /* no need for color when drawing depth buffer */ const short dflag_depth = DRAW_CONSTCOLOR; /* temp set drawtype to solid */ @@ -1548,7 +1547,7 @@ static void view3d_draw_objects( const char **grid_unit, const bool do_bgpic, const bool draw_offscreen, GPUFX *fx) { - SceneLayer *sl = C ? CTX_data_scene_layer(C) : BKE_scene_layer_active(scene); + SceneLayer *sl = C ? CTX_data_scene_layer(C) : BKE_scene_layer_render_active(scene); RegionView3D *rv3d = ar->regiondata; Base *base; const bool do_camera_frame = !draw_offscreen; |