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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-22 11:26:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-22 11:26:45 +0400
commit3289628610349784c0b068193da4275095b7a424 (patch)
tree8053d1e0ccbc95c7bc6389f48c8f988357bbe6cf /source/blender/bmesh
parent82d1b699b52e14062b9dcbd6044ca27c12511690 (diff)
fix [#31489] EdgeSplit modifier prevents All Edge to be work correctly since 2.63
bmesh regression where the edge-draw flag was cleared when bmesh modifiers were used.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/bmesh_class.h5
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c15
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c3
3 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index c536a22cf53..737efde8391 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -225,9 +225,10 @@ enum {
* when temp tagging is handy.
* always assume dirty & clear before use. */
- /* we have 2 spare flags which is awesome but since we're limited to 8
+ BM_ELEM_DRAW = (1 << 5), /* edge display */
+
+ /* we have 1 spare flag which is awesome but since we're limited to 8
* only add new flags with care! - campbell */
- /* BM_ELEM_SPARE = (1 << 5), */
/* BM_ELEM_SPARE = (1 << 6), */
BM_ELEM_INTERNAL_TAG = (1 << 7) /* for low level internal API tagging,
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index 684237b79c5..589a5fbaa66 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -973,6 +973,7 @@ char BM_edge_flag_from_mflag(const short meflag)
{
return ( ((meflag & SELECT) ? BM_ELEM_SELECT : 0) |
((meflag & ME_SEAM) ? BM_ELEM_SEAM : 0) |
+ ((meflag & ME_EDGEDRAW) ? BM_ELEM_DRAW : 0) |
((meflag & ME_SHARP) == 0 ? BM_ELEM_SMOOTH : 0) | /* invert */
((meflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0)
);
@@ -994,16 +995,18 @@ char BM_vert_flag_to_mflag(BMVert *eve)
((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0)
);
}
+
short BM_edge_flag_to_mflag(BMEdge *eed)
{
const char hflag = eed->head.hflag;
- return ( ((hflag & BM_ELEM_SELECT) ? SELECT : 0) |
- ((hflag & BM_ELEM_SEAM) ? ME_SEAM : 0) |
- ((hflag & BM_ELEM_SMOOTH) == 0 ? ME_SHARP : 0) |
- ((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0) |
- ((BM_edge_is_wire(eed)) ? ME_LOOSEEDGE : 0) | /* not typical */
- (ME_EDGEDRAW | ME_EDGERENDER)
+ return ( ((hflag & BM_ELEM_SELECT) ? SELECT : 0) |
+ ((hflag & BM_ELEM_SEAM) ? ME_SEAM : 0) |
+ ((hflag & BM_ELEM_DRAW) ? ME_EDGEDRAW : 0) |
+ ((hflag & BM_ELEM_SMOOTH) == 0 ? ME_SHARP : 0) |
+ ((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0) |
+ ((BM_edge_is_wire(eed)) ? ME_LOOSEEDGE : 0) | /* not typical */
+ ME_EDGERENDER
);
}
char BM_face_flag_to_mflag(BMFace *efa)
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index 351fb8e941b..a8c27e0a761 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -495,6 +495,9 @@ BLI_INLINE void bmesh_quick_edgedraw_flag(MEdge *med, BMEdge *e)
{
med->flag &= ~ME_EDGEDRAW;
}
+ else {
+ med->flag |= ME_EDGEDRAW;
+ }
}
void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess)