Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-10-26 21:03:09 +0300
committerHans Goudey <h.goudey@me.com>2021-10-26 21:03:09 +0300
commitc7b27f45ae7856560cd35dead8f1897b917c8d67 (patch)
tree871f5640fa802cfcae62a197930a9335d4a55c31 /source/blender
parent0bfae1b12078ef278a56c6e932c13be5bc9781aa (diff)
Fix: Show node editor dot grid when there is no node tree
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_node/node_draw.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index ea65eaa0a14..b7f1209905e 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -2272,6 +2272,9 @@ void node_draw_space(const bContext *C, ARegion *region)
/* Nodes. */
snode_set_context(C);
+ const int grid_levels = UI_GetThemeValueType(TH_NODE_GRID_LEVELS, SPACE_NODE);
+ UI_view2d_dot_grid_draw(v2d, TH_GRID, NODE_GRID_STEP_SIZE, grid_levels);
+
/* Draw parent node trees. */
if (snode->treepath.last) {
bNodeTreePath *path = (bNodeTreePath *)snode->treepath.last;
@@ -2294,9 +2297,6 @@ void node_draw_space(const bContext *C, ARegion *region)
copy_v2_v2(snode->edittree->view_center, center);
}
- const int grid_levels = UI_GetThemeValueType(TH_NODE_GRID_LEVELS, SPACE_NODE);
- UI_view2d_dot_grid_draw(v2d, TH_GRID, NODE_GRID_STEP_SIZE, grid_levels);
-
/* Top-level edit tree. */
bNodeTree *ntree = path->nodetree;
if (ntree) {