Page MenuHome

UI: Node space grid theming
ClosedPublic

Authored by Pawel Franitza (Rongix) on Feb 23 2020, 5:19 PM.

Details

Summary

This patch adds theming option to grid in node based editors (shader, compositor and texture view). It allows to change visual density of the grid - changing the numbers of lines drawn in the background. After feedback the parameter was renamed to "Grid levels". Earlier version of this patch requested to add toggle "Show grid" in the node editors under "View" menu, but it was reverted and now it is only possible to affect grid from preferences. Setting uses slider <0,2> with default 2 (current setting off grid in editors).
Grid on/off in Shader Editor/ Compositor:
Grid depth: 2 (default)


Grid depth: 1

Grid depth: 0 (disable grid)

Diff Detail

Repository
rB Blender

Event Timeline

Pawel Franitza (Rongix) edited the summary of this revision. (Show Details)Feb 23 2020, 5:28 PM
Pawel Franitza (Rongix) added a project: Nodes.
Pawel Franitza (Rongix) edited the summary of this revision. (Show Details)Feb 23 2020, 5:31 PM
Pawel Franitza (Rongix) edited the summary of this revision. (Show Details)Feb 23 2020, 6:19 PM
Brecht Van Lommel (brecht) requested changes to this revision.EditedFeb 24 2020, 7:29 PM

This seems more like a theme option? It's not clear to me why you'd want to hide this per editor?

I'm not sure cleaner is better in this case. The editors should all look a little different, the grid to me helps distinguish the node editor from others at a glance.

This revision now requires changes to proceed.Feb 24 2020, 7:29 PM
Pawel Franitza (Rongix) edited the summary of this revision. (Show Details)
  • Fixed grid visibility for Texture Node Editor

Hi! Please note that it's just a change proposition :D
I thought about placing it in theme setting but it didn't feel suitable because in every other editor the grid visibility is placed directly in the editor space. In theme it is possible to change node editor backgrounds for easy differentiation. For example in compositor view I don't really mind grid since backdrop usually covers whole view including grid, as for node view it makes whole view darker and introduces a lot of noise during panning around, especially in editing grouped nodes, possibly causing dizziness.

Placing it in view menu gives us advantages of having more than one node view next to each other and being able to differentiate them at the first glance.
Of course placing it in theme preferences is also a good idea, cause as of now there is no way of tweaking it.

Pawel Franitza (Rongix) planned changes to this revision.Feb 24 2020, 9:03 PM

Moving grid settings to Preferences -> Theme. It will be possible to adjust grid levels (so far it looks better than initial idea).

  • Added grid options to preferences
  • Revert "Fixed grid visibility for Texture Node Editor"
  • Revert "UI: Node space grid visibility"
  • Changed parameter UI text and description

This needs a change in do_versions_theme to ensure existing preferences do not load with grid levels 0. Something like:

if (!USER_VERSION_ATLEAST(283, 6)) {
  btheme->space_node.grid_levels = U_theme_default.space_node.grid_levels;
}
source/blender/makesrna/intern/rna_userdef.c
2820–2824

Use either "levels" or "depth" for both the UI and internal name.

The description should also be changed, maybe something like "Control amount of grid lines to display in the background".

Brecht Van Lommel (brecht) requested changes to this revision.Feb 25 2020, 3:39 PM
This revision now requires changes to proceed.Feb 25 2020, 3:39 PM

Does this affect the movie clip editor? I guess nah, but the graph/dopesheet view there has a very strong hardcoded grid that could benefit from something like this. 🤔

  • UI param rename and version dependency

Parameter name was changed in user preferences from "Grid depth" to "Grid levels",
description was changed from "Makes grid chunks more profound" to "Amount of grid lines displayed in the background",
added grid_levels to do_versions_theme

Pawel Franitza (Rongix) marked an inline comment as done.Feb 25 2020, 4:35 PM

@ThinkingPolygons (ThinkingPolygons) This change only applies to node based editors

Pawel Franitza (Rongix) retitled this revision from UI: Node space grid visibility to UI: Node space grid theming.Feb 27 2020, 9:54 AM
Pawel Franitza (Rongix) edited the summary of this revision. (Show Details)
Pawel Franitza (Rongix) edited the summary of this revision. (Show Details)Feb 28 2020, 9:16 AM
This revision is now accepted and ready to land.Feb 28 2020, 2:24 PM