[Bf-blender-cvs] [d91c266986d] master: LineArt: Material flag versioning correction.

YimingWu noreply at git.blender.org
Sat Jul 31 03:29:48 CEST 2021


Commit: d91c266986ded678bdc3ef83d69fbe456a23ef80
Author: YimingWu
Date:   Sat Jul 31 09:27:30 2021 +0800
Branches: master
https://developer.blender.org/rBd91c266986ded678bdc3ef83d69fbe456a23ef80

LineArt: Material flag versioning correction.

By the patch made it in master the version value already advanced (see https://developer.blender.org/D11839), so this versioning code needs to be moved down to that point.

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

M	source/blender/blenloader/intern/versioning_300.c

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

diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 95440f78cd2..9aec18ea279 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -583,11 +583,6 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
                     sizeof(scene->master_collection->id.name) - 2);
       }
     }
-    LISTBASE_FOREACH (Material *, mat, &bmain->materials) {
-      if (!(mat->lineart.flags & LRT_MATERIAL_CUSTOM_OCCLUSION_EFFECTIVENESS)) {
-        mat->lineart.mat_occlusion = 1;
-      }
-    }
   }
 
   if (!MAIN_VERSION_ATLEAST(bmain, 300, 9)) {
@@ -618,6 +613,11 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
         tool_settings->snap_uv_mode &= ~(1 << 4);
       }
     }
+    LISTBASE_FOREACH (Material *, mat, &bmain->materials) {
+      if (!(mat->lineart.flags & LRT_MATERIAL_CUSTOM_OCCLUSION_EFFECTIVENESS)) {
+        mat->lineart.mat_occlusion = 1;
+      }
+    }
   }
 
   if (!MAIN_VERSION_ATLEAST(bmain, 300, 13)) {



More information about the Bf-blender-cvs mailing list