Fix #109161: Baking freeze with invalid edge array

The old subsurf DerivedMesh code creates an edge layer
without initializing it, which makes the proper lazy initialization
of the edge layer later think that it's already finished. To avoid that,
remove the edges when creating the DerivedMesh at first.

Similar to 85bd64ece4
This commit is contained in:
Hans Goudey
2023-06-21 12:39:43 -04:00
parent bca236bfa0
commit d622673f4b

View File

@@ -1699,6 +1699,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
0,
ccgSubSurf_getNumFinalFaces(ss) * 4,
ccgSubSurf_getNumFinalFaces(ss));
CustomData_free_layer_named(&ccgdm->dm.edgeData, ".edge_verts", ccgSubSurf_getNumFinalEdges(ss));
CustomData_free_layer_named(
&ccgdm->dm.loopData, ".corner_vert", ccgSubSurf_getNumFinalFaces(ss) * 4);
CustomData_free_layer_named(