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:
authorJoseph Eagar <joeedh@gmail.com>2009-03-11 08:13:36 +0300
committerJoseph Eagar <joeedh@gmail.com>2009-03-11 08:13:36 +0300
commit27861a3b3b9364f6ee21d4e5625e5dfaa81f98a9 (patch)
treef703821e5fd5914b031b601d777d5e0de76fa335 /source/blender/editors/mesh
parenta254db099d3a8a79553c0d7b83ba1f5bddbbf26d (diff)
implemented an (edge) loop walker. note I misunderstood
how original edge loop worked, and made it so if it starts at a boundary edge, it walks across the boundary. I'm not sure if this is bad, most of the time I do that I want it to do that anyway.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index e2898d88640..0e0694fa168 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -1783,6 +1783,34 @@ static int edge_not_in_tagged_face(EditMesh *em, EditEdge *eed)
*/
static void edgeloop_select(EditMesh *em, EditEdge *starteed, int select)
{
+ BMesh *bm;
+ BMEdge *e;
+ EditMesh *em2;
+ BMOperator op;
+ BMWalker walker;
+
+ bm = init_editmesh_to_bmesh(em, &op);
+ BMO_Exec_Op(bm, &op);
+
+ e = BMO_Get_MapPointer(bm, &op, BMOP_FROM_EDITMESH_MAP, starteed);
+
+ BMW_Init(&walker, bm, BMW_LOOP, 0);
+ e = BMW_Begin(&walker, e);
+ for (; e; e=BMW_Step(&walker)) {
+ BM_Select(bm, e, 1);
+ }
+ BMW_End(&walker);
+
+ BMO_Finish_Op(bm, &op);
+
+ em2 = bmesh_to_editmesh(bm);
+ BM_Free_Mesh(bm);
+ set_editMesh(em, em2);
+ MEM_freeN(em2);
+}
+
+static void edgeloop_select_old(EditMesh *em, EditEdge *starteed, int select)
+{
EditVert *eve;
EditEdge *eed;
EditFace *efa;