Blender Git Loki

Git Commits -> Revision d070cce

July 26, 2021, 06:32 (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: d070cce77881c0f2c1bd7aa05fea4281a1cafce1
Parent Commit: b529a84
Committed By: Jeroen Bakker
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