diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-02 05:45:41 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-02 05:45:41 +0300 |
commit | 70a7685d04fb0e71390ea6b5fefa359942253f6b (patch) | |
tree | ceb7888f7c258e6e642cb07713c52ab3cd3270ab /source/blender/editors/space_node/node_draw.cc | |
parent | 2b6c01d98c404a74d2b1c8fb6c5807ef5695b9cb (diff) |
UI: Add an option to display the node editor context path
Since we have the overlays popover, it makes sense to allow toggling the
context path like in the 3D viewport. This commit adds a property,
and turns it on by default in existing files.
Differential Revision: https://developer.blender.org/D13248
Diffstat (limited to 'source/blender/editors/space_node/node_draw.cc')
-rw-r--r-- | source/blender/editors/space_node/node_draw.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 38328a92179..3089c1955b3 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -2650,16 +2650,16 @@ void node_draw_space(const bContext *C, ARegion *region) /* Reset view matrix. */ UI_view2d_view_restore(C); - if (snode->treepath.last) { - if (snode->overlay.flag & SN_OVERLAY_SHOW_OVERLAYS && snode->flag & SNODE_SHOW_GPENCIL) { + if (snode->overlay.flag & SN_OVERLAY_SHOW_OVERLAYS) { + if (snode->flag & SNODE_SHOW_GPENCIL && snode->treepath.last) { /* Draw grease-pencil (screen strokes, and also paint-buffer). */ ED_annotation_draw_view2d(C, false); } - } - /* Draw context path. */ - if (snode->edittree) { - draw_tree_path(*C, *region); + /* Draw context path. */ + if (snode->overlay.flag & SN_OVERLAY_SHOW_PATH && snode->edittree) { + draw_tree_path(*C, *region); + } } /* Scrollers. */ |