[Bf-blender-cvs] [af42b35e534] master: Fix UV snapping broken

Richard Antalik noreply at git.blender.org
Tue Jul 13 12:53:15 CEST 2021


Commit: af42b35e53413a90200bd9d8b0c2051ceee081b5
Author: Richard Antalik
Date:   Tue Jul 13 12:46:40 2021 +0200
Branches: master
https://developer.blender.org/rBaf42b35e53413a90200bd9d8b0c2051ceee081b5

Fix UV snapping broken

Caused by fba9cd019f21, then fixed by 0e4245bc28e6, 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

===================================================================

M	source/blender/blenkernel/BKE_blender_version.h
M	source/blender/blenloader/intern/versioning_300.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h
index 30f6ad7475d..e5217c6692b 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 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
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 5d3bde428c0..1e80510ef03 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -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.
    *



More information about the Bf-blender-cvs mailing list