forked from bartvdbraak/blender
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
This commit is contained in:
parent
9035f0cd25
commit
a5c32e1353
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user