Blender Git Loki

Git Commits -> Revision 5f9677f

Revision 5f9677f by Kévin Dietrich (master)
June 25, 2021, 12:16 (GMT)
Fix T88756: crash when baking with autosmooth

When baking some data, we create a new Mesh with edits and modifiers applied.
However, in some cases (e.g. when there is no modifier), the returned Mesh is
actually referencing the original one and its data layers. When autosmooth is
enabled we also split the Mesh. However, since the new Mesh is referencing the
original one, although `BKE_mesh_split_faces` is creating new vertices and edges,
the reallocation of the custom data layers is preempted because of the
reference, so adding the new vertices and edges overwrites valid data

To fix this we duplicate referenced layers before splitting the faces.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D11703

Commit Details:

Full Hash: 5f9677fe0c533b008b815d7fee0b56509a414ab7
Parent Commit: 3558bb8
Lines Changed: +19, -0

3 Modified Paths:

/source/blender/blenkernel/BKE_customdata.h (+3, -0) (Diff)
/source/blender/blenkernel/intern/customdata.c (+8, -0) (Diff)
/source/blender/blenkernel/intern/mesh.c (+8, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021