User Interface: Use theme alpha for the nodes frames background

This bump subversion.
This commit is contained in:
Dalai Felinto 2021-10-08 14:30:08 +02:00
parent ebe2374528
commit ff9587d28e
6 changed files with 36 additions and 26 deletions

View File

@ -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),

View File

@ -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"

View File

@ -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

View File

@ -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. */
}
}

View File

@ -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.
*

View File

@ -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) {