diff options
author | Dalai Felinto <dalai@blender.org> | 2021-10-08 15:30:08 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2021-10-08 16:37:43 +0300 |
commit | ff9587d28eab0339e8341673ed90db29a2932a95 (patch) | |
tree | b4890cc46829c15dcb58f1483cbee6e5b31c8025 | |
parent | ebe23745281e8675a6b45c39f79441a4f896963e (diff) |
User Interface: Use theme alpha for the nodes frames background
This bump subversion.
6 files changed, 36 insertions, 26 deletions
diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 6753dc8563e..1f9316cacfd 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -845,7 +845,7 @@ const bTheme U_theme_default = { .nodeclass_layout = RGBA(0x6c696fff), .nodeclass_geometry = RGBA(0x00d7a4ff), .nodeclass_attribute = RGBA(0x3f5980ff), - .movie = RGBA(0x1a1a1acc), + .movie = RGBA(0x1a1a1a7d), .gp_vertex_size = 3, .gp_vertex = RGBA(0x97979700), .gp_vertex_select = RGBA(0xff8500ff), diff --git a/release/scripts/presets/interface_theme/Blender_Light.xml b/release/scripts/presets/interface_theme/Blender_Light.xml index de6a5fe205c..834139458d5 100644 --- a/release/scripts/presets/interface_theme/Blender_Light.xml +++ b/release/scripts/presets/interface_theme/Blender_Light.xml @@ -950,7 +950,7 @@ color_node="#ffcb4d" group_node="#59b36ab9" group_socket_node="#dfc300" - frame_node="#9b9b9ba0" + frame_node="#9b9b9b60" matte_node="#977474" distor_node="#749797" noodle_curving="4" diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 31ce1b124e9..ceb19e87b40 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 32 +#define BLENDER_FILE_SUBVERSION 33 /* 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_300.c b/source/blender/blenloader/intern/versioning_300.c index 34712caf584..e1100fa40c4 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -643,6 +643,19 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) } } } + + if (!MAIN_VERSION_ATLEAST(bmain, 300, 33)) { + /* This was missing from #move_vertex_group_names_to_object_data. */ + LISTBASE_FOREACH (Object *, object, &bmain->objects) { + if (ELEM(object->type, OB_MESH, OB_LATTICE, OB_GPENCIL)) { + /* This uses the fact that the active vertex group index starts counting at 1. */ + if (BKE_object_defgroup_active_index_get(object) == 0) { + BKE_object_defgroup_active_index_set(object, object->actdef); + } + } + } + } + /** * Versioning code until next subversion bump goes here. * @@ -655,16 +668,6 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) */ { /* Keep this block, even when empty. */ - - /* This was missing from #move_vertex_group_names_to_object_data. */ - LISTBASE_FOREACH (Object *, object, &bmain->objects) { - if (ELEM(object->type, OB_MESH, OB_LATTICE, OB_GPENCIL)) { - /* This uses the fact that the active vertex group index starts counting at 1. */ - if (BKE_object_defgroup_active_index_get(object) == 0) { - BKE_object_defgroup_active_index_set(object, object->actdef); - } - } - } } } @@ -1708,18 +1711,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ - + if (!MAIN_VERSION_ATLEAST(bmain, 300, 33)) { for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -1742,4 +1734,17 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + } } diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index cd365b6be78..60e202746ff 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -301,6 +301,11 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) } } + if (!USER_VERSION_ATLEAST(300, 33)) { + /* Adjust the frame node alpha now that it is used differently. */ + btheme->space_node.movie[3] = U_theme_default.space_node.movie[3]; + } + /** * Versioning code until next subversion bump goes here. * diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index 8d6d56fc383..f7231df85a0 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -451,7 +451,7 @@ static void node_draw_frame(const bContext *C, const rctf *rct = &node->totr; UI_draw_roundbox_corner_set(UI_CNR_ALL); - UI_draw_roundbox_aa(rct, true, BASIS_RAD, color); + UI_draw_roundbox_4fv(rct, true, BASIS_RAD, color); /* outline active and selected emphasis */ if (node->flag & SELECT) { |