Fix UV snapping broken

Caused by fba9cd019f, then fixed by 0e4245bc28, but without
subversion bump, so some files were still broken after fix.

Repeat fix again, but this time also bump subversion.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D11864
This commit is contained in:
Richard Antalik 2021-07-13 12:46:40 +02:00
parent 71b4a1687e
commit af42b35e53
2 changed files with 11 additions and 1 deletions

View File

@ -39,7 +39,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
#define BLENDER_FILE_SUBVERSION 9
#define BLENDER_FILE_SUBVERSION 10
/* 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

@ -501,6 +501,16 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
FOREACH_NODETREE_END;
}
if (!MAIN_VERSION_ATLEAST(bmain, 300, 10)) {
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
ToolSettings *tool_settings = scene->toolsettings;
if (tool_settings->snap_uv_mode & (1 << 4)) {
tool_settings->snap_uv_mode |= (1 << 6); /* SCE_SNAP_MODE_INCREMENT */
tool_settings->snap_uv_mode &= ~(1 << 4);
}
}
}
/**
* Versioning code until next subversion bump goes here.
*