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:
authorJohnny Matthews <johnny.matthews@gmail.com>2005-10-21 18:51:17 +0400
committerJohnny Matthews <johnny.matthews@gmail.com>2005-10-21 18:51:17 +0400
commita5c32e13535acf42d0e44a77b29e0b4882164d57 (patch)
tree53550a6e64cb19cc0b50853622a8f2b50377bef8
parent9035f0cd257f94bc89579140d05a5064fa70305a (diff)
1. Moved Edgeloop Delete to Delete Menu out of Edge Specials
2. Edgeloop Delete will pop the undo stack if it fails 3. Small Tweak on CTRL-Subdivide selection
-rw-r--r--source/blender/include/BIF_editmesh.h2
-rw-r--r--source/blender/src/editmesh_mods.c10
-rw-r--r--source/blender/src/editmesh_tools.c17
3 files changed, 18 insertions, 11 deletions
diff --git a/source/blender/include/BIF_editmesh.h b/source/blender/include/BIF_editmesh.h
index bce9e82c277..3829afb04be 100644
--- a/source/blender/include/BIF_editmesh.h
+++ b/source/blender/include/BIF_editmesh.h
@@ -187,7 +187,7 @@ extern void bevel_menu();
extern void mesh_set_smooth_faces(short event);
void edge_rotate_selected(int dir);
int EdgeSlide(short immediate, float imperc);
-void EdgeLoopDelete(void);
+int EdgeLoopDelete(void);
void mesh_rip(void);
struct EditVert *editedge_getOtherVert(struct EditEdge *eed, struct EditVert *ev);
diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c
index 1c1a4774efb..1a6fff07a8d 100644
--- a/source/blender/src/editmesh_mods.c
+++ b/source/blender/src/editmesh_mods.c
@@ -1827,7 +1827,7 @@ void editmesh_mark_seam(int clear)
void Edge_Menu() {
short ret;
- ret= pupmenu("Edge Specials%t|Mark Seam %x1|Clear Seam %x2|Rotate Edge CW%x3|Rotate Edge CCW%x4|Loopcut%x6|Edge Slide%x5|EdgeLoop Delete%x7");
+ ret= pupmenu("Edge Specials%t|Mark Seam %x1|Clear Seam %x2|Rotate Edge CW%x3|Rotate Edge CCW%x4|Loopcut%x6|Edge Slide%x5");
switch(ret)
{
@@ -1845,16 +1845,12 @@ void Edge_Menu() {
break;
case 5:
EdgeSlide(0,0.0);
- BIF_undo_push("EdgeSlide");
+ BIF_undo_push("EdgeSlide");
break;
case 6:
- CutEdgeloop(1);
+ CutEdgeloop(1);
BIF_undo_push("Loopcut New");
break;
- case 7:
- EdgeLoopDelete();
- BIF_undo_push("Edgeloop Remove");
- break;
}
}
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c
index ae104bfc0a8..9ce646aaa48 100644
--- a/source/blender/src/editmesh_tools.c
+++ b/source/blender/src/editmesh_tools.c
@@ -907,7 +907,7 @@ void delete_mesh(void)
TEST_EDITMESH
- event= pupmenu("Erase %t|Vertices%x10|Edges%x1|Faces%x2|All%x3|Edges & Faces%x4|Only Faces%x5");
+ event= pupmenu("Erase %t|Vertices%x10|Edges%x1|Faces%x2|All%x3|Edges & Faces%x4|Only Faces%x5|Edge Loop%x6");
if(event<1) return;
if(event==10 ) {
@@ -916,6 +916,11 @@ void delete_mesh(void)
erase_faces(&em->faces);
erase_vertices(&em->verts);
}
+ else if(event==6) {
+ if(!EdgeLoopDelete()){
+ BIF_undo();
+ }
+ }
else if(event==4) {
str= "Erase Edges & Faces";
efa= em->faces.first;
@@ -1773,6 +1778,7 @@ static void fill_quad_double_adj_inner(EditFace *efa, struct GHash *gh, int numc
co[1] = (verts[0][numcuts-i]->co[1] + verts[1][i+1]->co[1] ) / 2 ;
co[2] = (verts[0][numcuts-i]->co[2] + verts[1][i+1]->co[2] ) / 2 ;
inner[i] = addvertlist(co);
+ inner[i]->f2 |= EDGEINNER;
}
// Add Corner Quad
@@ -2505,6 +2511,8 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
if(eed->f2 & EDGEINNER){
eed->f |= flag;
EM_select_edge(eed,1);
+ if(eed->v1->f & EDGEINNER) eed->v1->f |= SELECT;
+ if(eed->v2->f & EDGEINNER) eed->v2->f |= SELECT;
}else{
eed->f &= !flag;
EM_select_edge(eed,0);
@@ -4457,12 +4465,15 @@ typedef struct SlideVert {
EditVert origvert;
} SlideVert;
-void EdgeLoopDelete(void) {
- EdgeSlide(1, 1);
+int EdgeLoopDelete(void) {
+ if(!EdgeSlide(1, 1)){
+ return 0;
+ }
select_more();
removedoublesflag(1,0.001);
EM_select_flush();
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+ return 1;
}
int EdgeSlide(short immediate, float imperc)