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:
Diffstat (limited to 'source/blender/editors/space_node/node_draw.c')
-rw-r--r--source/blender/editors/space_node/node_draw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index d9e1216e1bb..91a42de05f2 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1691,6 +1691,8 @@ void drawnodespace(const bContext *C, ARegion *ar)
snode->cursor[0] /= UI_DPI_FAC;
snode->cursor[1] /= UI_DPI_FAC;
+ int grid_levels = UI_GetThemeValueType(TH_NODE_GRID_LEVELS, SPACE_NODE);
+
ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW);
/* only set once */
@@ -1753,8 +1755,11 @@ void drawnodespace(const bContext *C, ARegion *ar)
snode_setup_v2d(snode, ar, center);
/* grid, uses theme color based on node path depth */
- UI_view2d_multi_grid_draw(
- v2d, (depth > 0 ? TH_NODE_GROUP : TH_BACK), ED_node_grid_size(), NODE_GRID_STEPS, 2);
+ UI_view2d_multi_grid_draw(v2d,
+ (depth > 0 ? TH_NODE_GROUP : TH_BACK),
+ ED_node_grid_size(),
+ NODE_GRID_STEPS,
+ grid_levels);
/* backdrop */
draw_nodespace_back_pix(C, ar, snode, path->parent_key);
@@ -1795,7 +1800,7 @@ void drawnodespace(const bContext *C, ARegion *ar)
}
else {
/* default grid */
- UI_view2d_multi_grid_draw(v2d, TH_BACK, ED_node_grid_size(), NODE_GRID_STEPS, 2);
+ UI_view2d_multi_grid_draw(v2d, TH_BACK, ED_node_grid_size(), NODE_GRID_STEPS, grid_levels);
/* backdrop */
draw_nodespace_back_pix(C, ar, snode, NODE_INSTANCE_KEY_NONE);