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/makesrna/intern/rna_userdef.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 37d2b711b7d..d6a46cbcc82 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2911,10 +2911,10 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna) prop = RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "grid_levels"); - RNA_def_property_int_default(prop, 2); - RNA_def_property_range(prop, 0, 2); + RNA_def_property_int_default(prop, 7); + RNA_def_property_range(prop, 0, 9); RNA_def_property_ui_text( - prop, "Grid Levels", "Amount of grid lines displayed in the background"); + prop, "Grid Levels", "Number of subdivisions for the dot grid displayed in the background"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "dash_alpha", PROP_FLOAT, PROP_FACTOR); -- cgit v1.2.3