forked from bartvdbraak/blender
Fix T39839: Applying the subsurf modifier deletes the freestyle edge marks
This commit is contained in:
parent
bba974241b
commit
3182c54da6
@ -3411,6 +3411,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
|
|||||||
MEdge *medge = NULL;
|
MEdge *medge = NULL;
|
||||||
/* MFace *mface = NULL; */
|
/* MFace *mface = NULL; */
|
||||||
MPoly *mpoly = NULL;
|
MPoly *mpoly = NULL;
|
||||||
|
bool has_edge_cd;
|
||||||
|
|
||||||
DM_from_template(&ccgdm->dm, dm, DM_TYPE_CCGDM,
|
DM_from_template(&ccgdm->dm, dm, DM_TYPE_CCGDM,
|
||||||
ccgSubSurf_getNumFinalVerts(ss),
|
ccgSubSurf_getNumFinalVerts(ss),
|
||||||
@ -3571,6 +3572,8 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
|
|||||||
faceOrigIndex = DM_get_tessface_data_layer(&ccgdm->dm, CD_ORIGINDEX);
|
faceOrigIndex = DM_get_tessface_data_layer(&ccgdm->dm, CD_ORIGINDEX);
|
||||||
polyOrigIndex = DM_get_poly_data_layer(&ccgdm->dm, CD_ORIGINDEX);
|
polyOrigIndex = DM_get_poly_data_layer(&ccgdm->dm, CD_ORIGINDEX);
|
||||||
|
|
||||||
|
has_edge_cd = ((ccgdm->dm.edgeData.totlayer - (edgeOrigIndex ? 1 : 0)) != 0);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* this is not in trunk, can gives problems because colors initialize
|
/* this is not in trunk, can gives problems because colors initialize
|
||||||
* as black, just don't do it!, it works fine - campbell */
|
* as black, just don't do it!, it works fine - campbell */
|
||||||
@ -3765,6 +3768,12 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
|
|||||||
vertNum++;
|
vertNum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (has_edge_cd) {
|
||||||
|
for (i = 0; i < numFinalEdges; ++i) {
|
||||||
|
CustomData_copy_data(&dm->edgeData, &ccgdm->dm.edgeData, mapIndex, edgeNum + i, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (edgeOrigIndex) {
|
if (edgeOrigIndex) {
|
||||||
for (i = 0; i < numFinalEdges; ++i) {
|
for (i = 0; i < numFinalEdges; ++i) {
|
||||||
edgeOrigIndex[edgeNum + i] = mapIndex;
|
edgeOrigIndex[edgeNum + i] = mapIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user