From e463d2c16f72e976ed1c886aca3f8efe396978fb Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 25 Oct 2021 21:46:39 -0500 Subject: UI: Change node editor grid into a dot grid This patch makes the background grid of the node editor a grid of dots instead of lines. This makes the background look a bit more subtle and reduces visual complexity. The dots are meant to provide a reference when panning and zooming. Based on the design of @pablovazquez, and a patch originally authored by @fabian_schempp. The "Grid Levels" controls how many levels of dots are drawn. As the editor zooms in, the higher levels of dots fade in, making them closer together visually. The zoom factor at which each grid starts and ends fading in is controllable in the code, and could be tweaked further in the future. The new default value is 7, out of a range from 0 to 9. Differential Revision: https://developer.blender.org/D10345 --- source/blender/blenloader/intern/versioning_userdef.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenloader/intern/versioning_userdef.c') diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 170e6be715a..9b81d8b19aa 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -314,6 +314,11 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) btheme->space_node.dash_alpha = 0.5f; } + if (!USER_VERSION_ATLEAST(300, 39)) { + FROM_DEFAULT_V4_UCHAR(space_node.grid); + btheme->space_node.grid_levels = 7; + } + /** * Versioning code until next subversion bump goes here. * -- cgit v1.2.3