Fix: Add missing default versioning for retopology overlay color #105539

Merged
Jeroen Bakker merged 6 commits from bonj/blender:retopology-overlay-color-fix into main 2023-03-12 09:34:05 +01:00
3 changed files with 20 additions and 12 deletions

View File

@ -19,7 +19,7 @@ extern "C" {
/* Blender major and minor version. */
#define BLENDER_VERSION 306
/* Blender patch version for bugfix releases. */
#define BLENDER_VERSION_PATCH 0
#define BLENDER_VERSION_PATCH 1
/** Blender release cycle stage: alpha/beta/rc/release. */
#define BLENDER_VERSION_CYCLE alpha

View File

@ -4148,16 +4148,7 @@ void blo_do_versions_300(FileData *fd, Library * /*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.
*/
{
if (!MAIN_VERSION_ATLEAST(bmain, 306, 1)) {
/* Z bias for retopology overlay. */
if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "retopology_offset")) {
LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
@ -4180,11 +4171,24 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain)
SEQ_for_each_callback(&ed->seqbase, version_set_seq_single_frame_content, nullptr);
}
}
/* Keep this block, even when empty. */
LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
if (ntree->type == NTREE_GEOMETRY) {
version_geometry_nodes_extrude_smooth_propagation(*ntree);
}
}
}
/**
* 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

@ -89,6 +89,10 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
btheme->tui.wcol_view_item = U_theme_default.tui.wcol_view_item;
}
if (!USER_VERSION_ATLEAST(306, 1)) {
bonj marked this conversation as resolved
Review

You also need to bump the sub version:

  • Increase BLENDER_FILE_SUBVERSION
  • Use the same number in this if statement.
  • Ensure that all Versioning code until next subversion bump goes here. are guarded by a similar if statement in their respective files. Check ae84a2956e as an example.
You also need to bump the sub version: - Increase `BLENDER_FILE_SUBVERSION` - Use the same number in this if statement. - Ensure that all `Versioning code until next subversion bump goes here.` are guarded by a similar if statement in their respective files. Check ae84a2956ec61bc182f23c7a914fca3f37a5c83f as an example.
Review

If I move retopology_offset in the versioning 300 file into a version check block, does it still need to check if it exists in the DNA, or is the version check alone enough?
I'm going to assume the DNA check stays, but asking just to be sure.
There's also other people's code in the "Versioning code until next subversion bump goes here." block that has retopology_offset, so I'll move that into the 306.1 version check as well.

If I move retopology_offset in the versioning 300 file into a version check block, does it still need to check if it exists in the DNA, or is the version check alone enough? I'm going to assume the DNA check stays, but asking just to be sure. There's also other people's code in the "Versioning code until next subversion bump goes here." block that has retopology_offset, so I'll move that into the 306.1 version check as well.
FROM_DEFAULT_V4_UCHAR(space_view3d.face_retopology);
}
/**
* Versioning code until next subversion bump goes here.
*