[Bf-blender-cvs] [558d7dd90e5] master: Fix T61376 Group Node Node Editor theme property is missing alpha channel

Sebastian Parborg noreply at git.blender.org
Mon Feb 11 16:59:37 CET 2019


Commit: 558d7dd90e56ca1b4dbf1b7b8b7b555791821148
Author: Sebastian Parborg
Date:   Mon Feb 11 16:56:20 2019 +0100
Branches: master
https://developer.blender.org/rB558d7dd90e56ca1b4dbf1b7b8b7b555791821148

Fix T61376 Group Node Node Editor theme property is missing alpha channel

It is now possible to adjust the group node background alpha.
The defaults are the same as before, but you can now adjust the alpha
level via the theme preferences (and the alpha value is no longer hard
coded).

===================================================================

M	release/datafiles/userdef/userdef_default_theme.c
M	source/blender/editors/space_node/node_draw.c
M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c
index aa275d6a99e..9c195fef202 100644
--- a/release/datafiles/userdef/userdef_default_theme.c
+++ b/release/datafiles/userdef/userdef_default_theme.c
@@ -786,7 +786,7 @@ const bTheme U_theme_default = {
 		.syntaxb = RGBA(0xccb83dff),
 		.syntaxn = RGBA(0xe64555ff),
 		.syntaxv = RGBA(0x66c4ffff),
-		.syntaxc = RGBA(0x426628ff),
+		.syntaxc = RGBA(0x426628b9),
 		.syntaxd = RGBA(0x749797ff),
 		.syntaxr = RGBA(0x808080ff),
 		.nodeclass_output = RGBA(0xb33641ff),
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index c5993341f92..69a6d538b29 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1307,7 +1307,7 @@ static void draw_group_overlay(const bContext *C, ARegion *ar)
 	/* shade node groups to separate them visually */
 	GPU_blend(true);
 
-	UI_GetThemeColorShadeAlpha4fv(TH_NODE_GROUP, 0, -70, color);
+	UI_GetThemeColorShadeAlpha4fv(TH_NODE_GROUP, 0, 0, color);
 	UI_draw_roundbox_corner_set(UI_CNR_NONE);
 	UI_draw_roundbox_4fv(true, rect.xmin, rect.ymin, rect.xmax, rect.ymax, 0, color);
 	GPU_blend(false);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 603a633dc29..8122ffee8a7 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2394,7 +2394,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
 
 	prop = RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR_GAMMA);
 	RNA_def_property_float_sdna(prop, NULL, "syntaxc");
-	RNA_def_property_array(prop, 3);
+	RNA_def_property_array(prop, 4);
 	RNA_def_property_ui_text(prop, "Group Node", "");
 	RNA_def_property_update(prop, 0, "rna_userdef_update");



More information about the Bf-blender-cvs mailing list