From 9b1b4b9e32c8ac86e460204bb93e0ddc42ad9e49 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Thu, 21 Oct 2021 21:00:17 +0200 Subject: Node Editor: Introduce color overlay and dashed wires theme setting This patch includes code from D9891 and D12754, so credit goes to Juanfran and Dalai. I updated the patches to work with `master` and with the new overlay toggle. The reason to include both changes as part of one patch is that the dimmed dashed lines work much better together with colored wires. Theme setting for dash opacity: {F11370574, size=full} {F11286177, size=full, autoplay, loop} {F11149912, size=full} For adding the overlay I used `SpaceImageOverlay` as reference, although I'm not familiar with this code so there might be mistakes. Reviewed By: #user_interface, HooglyBoogly Differential Revision: https://developer.blender.org/D12886 --- source/blender/makesdna/DNA_space_types.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/makesdna/DNA_space_types.h') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index c77a4b7857d..5ebc81fff4f 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1509,6 +1509,15 @@ typedef struct bNodeTreePath { char display_name[64]; } bNodeTreePath; +typedef struct SpaceNodeOverlay { + int flag; +} SpaceNodeOverlay; + +typedef enum eSpaceNodeOverlay_Flag { + SN_OVERLAY_SHOW_OVERLAYS = (1 << 1), + SN_OVERLAY_SHOW_WIRE_COLORS = (1 << 2), +} eSpaceNodeOverlay_Flag; + typedef struct SpaceNode { SpaceLink *next, *prev; /** Storage of regions for inactive spaces. */ @@ -1562,6 +1571,9 @@ typedef struct SpaceNode { /** Grease-pencil data. */ struct bGPdata *gpd; + SpaceNodeOverlay overlay; + char _pad2[4]; + SpaceNode_Runtime *runtime; } SpaceNode; -- cgit v1.2.3