Mesh: Add versioning in 3.0 for vertex normal refactor
This tags all meshes from the future 3.1 version dirty, since normals aren't "implicitly" read as part of `MVert` anymore after rBcfa53e0fbeed7178. Differential Revision: https://developer.blender.org/D13856
This commit is contained in:
parent
63b9e5378b
commit
add07576a0
Notes:
blender-bot
2023-02-14 06:19:41 +01:00
Referenced by issue #93479, 3.0 Potential candidates for corrective releases
|
@ -43,6 +43,7 @@
|
|||
#include "DNA_lineart_types.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_material_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_text_types.h"
|
||||
#include "DNA_workspace_types.h"
|
||||
|
@ -2369,6 +2370,15 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
}
|
||||
}
|
||||
|
||||
/* Mesh vertex normals are stored differently after 3.1 (see D12770). This causes an incorrect
|
||||
* viewport display when smooth faces are loaded from the future version, so tag normals dirty
|
||||
* on all meshes from future versions. */
|
||||
if (!DNA_struct_elem_find(fd->filesdna, "MVert", "short", "no[3]")) {
|
||||
LISTBASE_FOREACH (Mesh *, mesh, &bmain->meshes) {
|
||||
mesh->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Versioning code until next subversion bump goes here.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue