Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dalai@blender.org>2021-10-08 15:30:08 +0300
committerDalai Felinto <dalai@blender.org>2021-10-08 16:37:43 +0300
commitff9587d28eab0339e8341673ed90db29a2932a95 (patch)
treeb4890cc46829c15dcb58f1483cbee6e5b31c8025 /source/blender
parentebe23745281e8675a6b45c39f79441a4f896963e (diff)
User Interface: Use theme alpha for the nodes frames background
This bump subversion.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_blender_version.h2
-rw-r--r--source/blender/blenloader/intern/versioning_300.c49
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c5
-rw-r--r--source/blender/editors/space_node/drawnode.cc2
4 files changed, 34 insertions, 24 deletions
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) {