Core: Fix broken CustomData IO with Autosave files #106648

Merged
Joseph Eagar merged 5 commits from temp-autosave-bug into main 2023-04-07 02:02:31 +02:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit eff9f664e6 - Show all commits

View File

@ -4220,8 +4220,8 @@ void CustomData_blend_write_prepare(CustomData &data,
/* Note: data->layers may be null, this happens when adding
* a legacy MPoly struct to a mesh with no other face attributes.
* This leaves us with no unique ID for DNA to key off of when
* loading the file.
* This leaves us with no unique ID for DNA to identify the old

I wonder if there's a more specific wording than "key off of". What about something like "identify the old data with"?

I think my lack of understanding here is the key part of the problem.

I wonder if there's a more specific wording than "key off of". What about something like "identify the old data with"? I think my lack of understanding here is the key part of the problem.
* data with when loading the file.
*/
if (!data.layers && layers_to_write.size() > 0) {
/* We just need an address that's unique. */

View File

@ -1243,7 +1243,6 @@ void BKE_mesh_legacy_sharp_faces_from_flags(Mesh *mesh)
if (attributes.contains("sharp_face")) {
return;
}
const Span<MPoly> polys(static_cast<const MPoly *>(CustomData_get_layer(&mesh->pdata, CD_MPOLY)),

Unnecessary white-space change here

Unnecessary white-space change here
mesh->totpoly);
if (std::any_of(polys.begin(), polys.end(), [](const MPoly &poly) {