diff options
author | Pablo Vazquez <pablovazquez> | 2021-10-21 22:00:17 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2021-10-21 22:00:38 +0300 |
commit | 9b1b4b9e32c8ac86e460204bb93e0ddc42ad9e49 (patch) | |
tree | 564dd67518d0f5d504de2b30a871a46401f97720 /source/blender/makesrna/intern/rna_userdef.c | |
parent | 1d96a482675dd2ccad2af31c274f74b9f6603d6b (diff) |
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
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 6d7bb9118b1..c80ba4ef6e6 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2917,6 +2917,12 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna) prop, "Grid Levels", "Amount of grid lines 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); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_float_default(prop, 0.5f); + RNA_def_property_ui_text(prop, "Dashed Lines Opacity", "Opacity for the dashed lines in wires"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "input_node", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "syntaxn"); RNA_def_property_array(prop, 3); |