diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-09-10 01:46:19 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-09-10 01:46:19 +0400 |
commit | aa10e1b11eca50503b0b52f0723f698f0527822f (patch) | |
tree | e794306994980788ed6ef1ba88006f0b2dab3658 /source | |
parent | f305bb22b7e5f809063539cdb76a24727f41a11a (diff) |
Bugfix for [#17363] Edge selection mode + knife twice = latter cut doesn't do anything
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/editmesh_loop.c | 6 | ||||
-rw-r--r-- | source/blender/src/editmesh_tools.c | 17 |
2 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/src/editmesh_loop.c b/source/blender/src/editmesh_loop.c index 4ac5072b212..2c5386b86b6 100644 --- a/source/blender/src/editmesh_loop.c +++ b/source/blender/src/editmesh_loop.c @@ -745,9 +745,9 @@ void KnifeSubdivide(char mode) eed= eed->next; } - if (mode==KNIFE_EXACT) esubdivideflag(1, 0, B_KNIFE|B_PERCENTSUBD,1,SUBDIV_SELECT_ORIG); - else if (mode==KNIFE_MIDPOINT) esubdivideflag(1, 0, B_KNIFE,1,SUBDIV_SELECT_ORIG); - else if (mode==KNIFE_MULTICUT) esubdivideflag(1, 0, B_KNIFE,numcuts,SUBDIV_SELECT_ORIG); + if(mode==KNIFE_EXACT) esubdivideflag(SELECT, 0, B_KNIFE|B_PERCENTSUBD,1,SUBDIV_SELECT_ORIG); + else if (mode==KNIFE_MIDPOINT) esubdivideflag(SELECT, 0, B_KNIFE,1,SUBDIV_SELECT_ORIG); + else if (mode==KNIFE_MULTICUT) esubdivideflag(SELECT, 0, B_KNIFE,numcuts,SUBDIV_SELECT_ORIG); eed=em->edges.first; while(eed){ diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index c2fccb0e50f..fe4c98aa4de 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -2698,16 +2698,21 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype) free_tagged_edges_faces(em->edges.first, em->faces.first); if(seltype == SUBDIV_SELECT_ORIG && G.qual != LR_CTRLKEY) { + /* bugfix: vertex could get flagged as "not-selected" + // solution: clear flags before, not at the same time as setting SELECT flag -dg + */ for(eed = em->edges.first;eed;eed = eed->next) { - if(eed->f2 & EDGENEW || eed->f2 & EDGEOLD) { - eed->f |= flag; - EM_select_edge(eed,1); - - }else{ + if(!(eed->f2 & EDGENEW || eed->f2 & EDGEOLD)) { eed->f &= !flag; EM_select_edge(eed,0); } - } + } + for(eed = em->edges.first;eed;eed = eed->next) { + if(eed->f2 & EDGENEW || eed->f2 & EDGEOLD) { + eed->f |= flag; + EM_select_edge(eed,1); + } + } } else if ((seltype == SUBDIV_SELECT_INNER || seltype == SUBDIV_SELECT_INNER_SEL)|| G.qual == LR_CTRLKEY) { for(eed = em->edges.first;eed;eed = eed->next) { if(eed->f2 & EDGEINNER) { |