[Bf-blender-cvs] [4a0ddeb62bb] master: Nodes: Change wire color to increase contrast

Dalai Felinto noreply at git.blender.org
Mon Sep 27 16:10:05 CEST 2021


Commit: 4a0ddeb62bb4a438dfa9cedc7ea5a528531eaaee
Author: Dalai Felinto
Date:   Mon Sep 27 15:37:07 2021 +0200
Branches: master
https://developer.blender.org/rB4a0ddeb62bb4a438dfa9cedc7ea5a528531eaaee

Nodes: Change wire color to increase contrast

If the theme used by the user did not touch the wire or the wire outline
colors this will update them as well.

This was supposed to be a part of a bigger UI theme change for 3.0. But
it was expedited because of the recent change in line thickness for the
noodles (2bd02052157).

Theme change by Pablo Vazquez.

Differential Revision: https://developer.blender.org/D12649

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

M	release/datafiles/userdef/userdef_default_theme.c
M	source/blender/blenkernel/BKE_blender_version.h
M	source/blender/blenloader/intern/versioning_userdef.c

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

diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c
index 85532d01d5c..05c5a625215 100644
--- a/release/datafiles/userdef/userdef_default_theme.c
+++ b/release/datafiles/userdef/userdef_default_theme.c
@@ -817,7 +817,7 @@ const bTheme U_theme_default = {
     },
     .shade2 = RGBA(0x7f707064),
     .grid = RGBA(0x23232300),
-    .wire = RGBA(0x808080ff),
+    .wire = RGBA(0x232323ff),
     .select = RGBA(0xed5700ff),
     .active = RGBA(0xffffffff),
     .edge_select = RGBA(0xffffffff),
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h
index 6f7e6363a37..b973d8b9a18 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -39,7 +39,7 @@ extern "C" {
 
 /* Blender file format version. */
 #define BLENDER_FILE_VERSION BLENDER_VERSION
-#define BLENDER_FILE_SUBVERSION 26
+#define BLENDER_FILE_SUBVERSION 27
 
 /* Minimum Blender version that supports reading file written with the current
  * version. Older Blender versions will test this and show a warning if the file
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index a0f35d32a7c..64ecfbe78de 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -291,6 +291,16 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
     btheme->space_sequencer.grid[3] = 255;
   }
 
+  if (!USER_VERSION_ATLEAST(300, 27)) {
+    /* If users have not changed the color of the wires inner color or main color,
+     * set it to the new default. */
+    if ((btheme->space_node.wire[0] == 35) && (btheme->space_node.wire[1] == 35) &&
+        (btheme->space_node.wire[2] == 35) && (btheme->space_node.syntaxr[0] == 128) &&
+        (btheme->space_node.syntaxr[1] == 128) && (btheme->space_node.syntaxr[2] == 128)) {
+      FROM_DEFAULT_V4_UCHAR(space_node.wire);
+    }
+  }
+
   /**
    * Versioning code until next subversion bump goes here.
    *



More information about the Bf-blender-cvs mailing list