diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-30 23:20:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-30 23:20:17 +0400 |
commit | 00acdb629254b680992f1863a1d62cd2985198af (patch) | |
tree | e29b23a247a6111dc47f508cab01e2a5d955b983 /source/blender/editors/mesh | |
parent | 6bd18e357563f6b28f7cfdf6da8a032bab947172 (diff) |
remove CD_POLYINDEX customdata layer:
reported as [#29376] BMESH_TODO: remove tessface CD_ORIGINDEX layer
for a single mesh there could be 3 origindex mappings stored, one on the polygons and 2 on the tessfaces.
(CD_POLYINDEX and CD_ORIGINDEX).
as Andrew suggests, now tessfaces (which are really a cache of polygons), using origindex to point to polygons on
the same derived mesh, and polygons only store the original index values.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 429b2148894..4350c005f95 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -85,7 +85,7 @@ void paintface_flush_flags(Object *ob) * - Final derived polys => Final derived tessfaces */ - if ((index_array = CustomData_get_layer(&me->fdata, CD_POLYINDEX))) { + if ((index_array = CustomData_get_layer(&me->fdata, CD_ORIGINDEX))) { faces = me->mface; totface = me->totface; @@ -109,7 +109,7 @@ void paintface_flush_flags(Object *ob) } } - if ((index_array = CustomData_get_layer(&dm->faceData, CD_POLYINDEX))) { + if ((index_array = CustomData_get_layer(&dm->faceData, CD_ORIGINDEX))) { polys = dm->getPolyArray(dm); faces = dm->getTessFaceArray(dm); totface = dm->getNumTessFaces(dm); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 4adf37a14c3..a4640677a4e 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -902,7 +902,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface) * so rather then add poly-index layer and calculate normals for it * calculate normals only for the mvert's. - campbell */ #ifdef USE_BMESH_MPOLY_NORMALS - polyindex = CustomData_get_layer(&mesh->fdata, CD_POLYINDEX); + polyindex = CustomData_get_layer(&mesh->fdata, CD_ORIGINDEX); /* add a normals layer for tessellated faces, a tessface normal will * contain the normal of the poly the face was tessellated from. */ face_nors = CustomData_add_layer(&mesh->fdata, CD_NORMAL, CD_CALLOC, NULL, mesh->totface); |