[Bf-blender-cvs] [352d55b1c88] master: Mesh: Avoid saving redundant generic material index attribute

Hans Goudey noreply at git.blender.org
Sat Sep 10 00:58:47 CEST 2022


Commit: 352d55b1c88776e52050db1adc6a5aa1da13596e
Author: Hans Goudey
Date:   Fri Sep 9 15:05:05 2022 -0500
Branches: master
https://developer.blender.org/rB352d55b1c88776e52050db1adc6a5aa1da13596e

Mesh: Avoid saving redundant generic material index attribute

This attribute is still read and written in the legacy format which
puts it inside of `MPoly`. Missed in f1c0249f34c4171ec.

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

M	source/blender/blenkernel/intern/mesh.cc

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

diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc
index a5b50824542..a0548b7efd4 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -253,7 +253,7 @@ static void mesh_blend_write(BlendWriter *writer, ID *id, const void *id_address
       BKE_mesh_legacy_convert_material_indices_to_mpoly(mesh);
       BKE_mesh_legacy_bevel_weight_from_layers(mesh);
       /* When converting to the old mesh format, don't save redundant attributes. */
-      names_to_skip.add_multiple_new({".hide_vert", ".hide_edge", ".hide_poly"});
+      names_to_skip.add_multiple_new({".hide_vert", ".hide_edge", ".hide_poly", "material_index"});
 
       /* Set deprecated mesh data pointers for forward compatibility. */
       mesh->mvert = const_cast<MVert *>(mesh->verts().data());



More information about the Bf-blender-cvs mailing list