Fix T40457: Subsurf modifier with Freestyle edges

You can't use ORIG index as an index to copy CD from source DM.
This commit is contained in:
Sergey Sharybin
2014-06-02 14:24:25 +06:00
parent ba8c2be739
commit 3e6c734eaa

View File

@@ -3780,8 +3780,9 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
}
if (has_edge_cd) {
BLI_assert(edgeIdx >= 0 && edgeIdx < dm->getNumEdges(dm));
for (i = 0; i < numFinalEdges; ++i) {
CustomData_copy_data(&dm->edgeData, &ccgdm->dm.edgeData, mapIndex, edgeNum + i, 1);
CustomData_copy_data(&dm->edgeData, &ccgdm->dm.edgeData, edgeIdx, edgeNum + i, 1);
}
}