diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-24 16:20:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-26 18:06:14 +0300 |
commit | 67b014af484ad4ba6667e3cf9907422bedc8238a (patch) | |
tree | 68408128f8377b864c7b77be7c91b1fcead601b7 /source/blender/editors/space_outliner/outliner_draw.c | |
parent | c490428bd4dff75fb371777d4e95ea270c77ea94 (diff) |
Workspaces: active view layer now always comes from workspace, not scene.
Both the scene and workspace had an active view layer, and it was confusing
which settings were being used or displayed where. Now we always have one,
so there is no mismatch.
The "View Layers" tab in the properties editor is now "View Layer", no longer
showing a list of layers. Instead view layers can be added and removed with
the workspace view layer selector. They are also listed and selectable in the
outliner.
Single layer rendering uses the active view layer from the workspace.
This fixes bugs where the wrong active view layer was used, but more places
remain that are wrong and are now using the first view layer in the scene.
These are all marked with BKE_view_layer_context_active_PLACEHOLDER.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 765c77e4906..fad35060d72 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -442,11 +442,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar if (te->ys + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { if (tselem->type == TSE_R_LAYER && (soops->outlinevis == SO_SCENES)) { /* View layer render toggle. */ + ViewLayer *view_layer = te->directdata; + UI_block_emboss_set(block, UI_EMBOSS_NONE); - bt = uiDefIconButBitI(block, UI_BTYPE_ICON_TOGGLE_N, VIEW_LAYER_RENDER, 0, ICON_RESTRICT_RENDER_OFF, + bt = uiDefIconButBitS(block, UI_BTYPE_ICON_TOGGLE_N, VIEW_LAYER_RENDER, 0, ICON_RESTRICT_RENDER_OFF, (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX), te->ys, UI_UNIT_X, - UI_UNIT_Y, te->directdata, 0, 0, 0, 0, TIP_("Use view layer for rendering")); + UI_UNIT_Y, &view_layer->flag, 0, 0, 0, 0, TIP_("Use view layer for rendering")); UI_but_func_set(bt, restrictbutton_r_lay_cb, tselem->id, NULL); UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); @@ -1045,7 +1047,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto ICON_DRAW(ICON_OUTLINER_OB_GROUP_INSTANCE); break; case TSE_R_LAYER: - ICON_DRAW(ICON_RENDERLAYERS); + ICON_DRAW(ICON_RENDER_RESULT); break; case TSE_LINKED_LAMP: ICON_DRAW(ICON_LAMP_DATA); |