[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42113] branches/bmesh/blender/source/ blender/bmesh/operators/mesh_conv.c: move edge angle test from previous commit into a static function & set on the edge loop rather then of face edges .
Campbell Barton
ideasman42 at gmail.com
Thu Nov 24 04:12:45 CET 2011
Revision: 42113
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42113
Author: campbellbarton
Date: 2011-11-24 03:12:37 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
move edge angle test from previous commit into a static function & set on the edge loop rather then of face edges.
Modified Paths:
--------------
branches/bmesh/blender/source/blender/bmesh/operators/mesh_conv.c
Modified: branches/bmesh/blender/source/blender/bmesh/operators/mesh_conv.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/mesh_conv.c 2011-11-24 02:52:38 UTC (rev 42112)
+++ branches/bmesh/blender/source/blender/bmesh/operators/mesh_conv.c 2011-11-24 03:12:37 UTC (rev 42113)
@@ -413,6 +413,21 @@
return vertMap;
}
+BM_INLINE void bmesh_quick_edgedraw_flag(MEdge *med, BMEdge *e)
+{
+ /* this is a cheap way to set the edge draw, its not precise and will
+ * pick the first 2 faces an edge uses */
+
+
+ if ( /* (med->flag & ME_EDGEDRAW) && */ /* assume to be true */
+ (e->l && (e->l != e->l->radial_next)) &&
+ (dot_v3v3(e->l->f->no, e->l->radial_next->f->no) > 0.995f))
+ {
+ med->flag &= ~ME_EDGEDRAW;
+ }
+}
+
+
void bmesh_to_mesh_exec(BMesh *bm, BMOperator *op)
{
Mesh *me = BMO_Get_Pnt(op, "mesh");
@@ -532,6 +547,8 @@
/*copy over customdata*/
CustomData_from_bmesh_block(&bm->edata, &me->edata, e->head.data, i);
+ bmesh_quick_edgedraw_flag(med, e);
+
i++;
med++;
BM_CHECK_ELEMENT(bm, e);
@@ -661,21 +678,6 @@
mloop->e = BM_GetIndex(l->e);
mloop->v = BM_GetIndex(l->v);
-
-#if 1
- /* this is a cheap way to set the edge draw, just so happens
- * at this part of the code the info is available, feel free to
- * move this block of code elsewhere */
-
- if ( (l != l->radial_next) &&
- (medge[mloop->e].flag & ME_EDGEDRAW) &&
- (dot_v3v3(f->no, l->radial_next->f->no) > 0.995f))
- {
- medge[mloop->e].flag &= ~ME_EDGEDRAW;
- }
-#endif
-
-
/*copy over customdata*/
CustomData_from_bmesh_block(&bm->ldata, &me->ldata, l->head.data, j);
BM_CHECK_ELEMENT(bm, l);
More information about the Bf-blender-cvs
mailing list