Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-09-22 20:57:16 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-09-22 20:57:16 +0400
commit799afc1aa4bff22a6aed21a1cfe7da9e55d18a10 (patch)
treefe68847027a39d6f798c392120beceff9631568e /source/blender/modifiers
parent9ea32d34c441fba68f7536171351ff386490df8c (diff)
Fix #28226: Selection highlighting is wrong when Solidify Modifier is used
Set origindices for edges/faces created for rim to ORIGINDEX_NONE. Also discovered error in recent editmode VBO fix -- it used to crash when comparing faces with ORIGINDEX_NONE original index.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index afe6da8b38a..757da28e4b5 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -524,7 +524,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if(smd->flag & MOD_SOLIDIFY_RIM) {
-
+ int *origindex;
/* bugger, need to re-calculate the normals for the new edge faces.
* This could be done in many ways, but probably the quickest way is to calculate the average normals for side faces only.
@@ -551,18 +551,22 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
{0, 3, 3, 0}};
/* add faces & edges */
+ origindex= result->getEdgeDataArray(result, CD_ORIGINDEX);
ed= medge + (numEdges * 2);
for(i=0; i<newEdges; i++, ed++) {
ed->v1= new_vert_arr[i];
ed->v2= new_vert_arr[i] + numVerts;
ed->flag |= ME_EDGEDRAW;
+ origindex[numEdges * 2 + i]= ORIGINDEX_NONE;
+
if(crease_rim)
ed->crease= crease_rim;
}
/* faces */
mf= mface + (numFaces * 2);
+ origindex= result->getFaceDataArray(result, CD_ORIGINDEX);
for(i=0; i<newFaces; i++, mf++) {
int eidx= new_edge_arr[i];
int fidx= edge_users[eidx];
@@ -623,6 +627,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
add_v3_v3(edge_vert_nos[ed->v1], nor);
add_v3_v3(edge_vert_nos[ed->v2], nor);
#endif
+ origindex[numFaces * 2 + i]= ORIGINDEX_NONE;
}
#ifdef SOLIDIFY_SIDE_NORMALS