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);
|
extern void mesh_set_smooth_faces(short event);
|
||||||
void edge_rotate_selected(int dir);
|
void edge_rotate_selected(int dir);
|
||||||
int EdgeSlide(short immediate, float imperc);
|
int EdgeSlide(short immediate, float imperc);
|
||||||
void EdgeLoopDelete(void);
|
int EdgeLoopDelete(void);
|
||||||
void mesh_rip(void);
|
void mesh_rip(void);
|
||||||
|
|
||||||
struct EditVert *editedge_getOtherVert(struct EditEdge *eed, struct EditVert *ev);
|
struct EditVert *editedge_getOtherVert(struct EditEdge *eed, struct EditVert *ev);
|
||||||
|
@ -1827,7 +1827,7 @@ void editmesh_mark_seam(int clear)
|
|||||||
void Edge_Menu() {
|
void Edge_Menu() {
|
||||||
short ret;
|
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)
|
switch(ret)
|
||||||
{
|
{
|
||||||
@ -1851,10 +1851,6 @@ void Edge_Menu() {
|
|||||||
CutEdgeloop(1);
|
CutEdgeloop(1);
|
||||||
BIF_undo_push("Loopcut New");
|
BIF_undo_push("Loopcut New");
|
||||||
break;
|
break;
|
||||||
case 7:
|
|
||||||
EdgeLoopDelete();
|
|
||||||
BIF_undo_push("Edgeloop Remove");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -907,7 +907,7 @@ void delete_mesh(void)
|
|||||||
|
|
||||||
TEST_EDITMESH
|
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<1) return;
|
||||||
|
|
||||||
if(event==10 ) {
|
if(event==10 ) {
|
||||||
@ -916,6 +916,11 @@ void delete_mesh(void)
|
|||||||
erase_faces(&em->faces);
|
erase_faces(&em->faces);
|
||||||
erase_vertices(&em->verts);
|
erase_vertices(&em->verts);
|
||||||
}
|
}
|
||||||
|
else if(event==6) {
|
||||||
|
if(!EdgeLoopDelete()){
|
||||||
|
BIF_undo();
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(event==4) {
|
else if(event==4) {
|
||||||
str= "Erase Edges & Faces";
|
str= "Erase Edges & Faces";
|
||||||
efa= em->faces.first;
|
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[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 ;
|
co[2] = (verts[0][numcuts-i]->co[2] + verts[1][i+1]->co[2] ) / 2 ;
|
||||||
inner[i] = addvertlist(co);
|
inner[i] = addvertlist(co);
|
||||||
|
inner[i]->f2 |= EDGEINNER;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add Corner Quad
|
// Add Corner Quad
|
||||||
@ -2505,6 +2511,8 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
|
|||||||
if(eed->f2 & EDGEINNER){
|
if(eed->f2 & EDGEINNER){
|
||||||
eed->f |= flag;
|
eed->f |= flag;
|
||||||
EM_select_edge(eed,1);
|
EM_select_edge(eed,1);
|
||||||
|
if(eed->v1->f & EDGEINNER) eed->v1->f |= SELECT;
|
||||||
|
if(eed->v2->f & EDGEINNER) eed->v2->f |= SELECT;
|
||||||
}else{
|
}else{
|
||||||
eed->f &= !flag;
|
eed->f &= !flag;
|
||||||
EM_select_edge(eed,0);
|
EM_select_edge(eed,0);
|
||||||
@ -4457,12 +4465,15 @@ typedef struct SlideVert {
|
|||||||
EditVert origvert;
|
EditVert origvert;
|
||||||
} SlideVert;
|
} SlideVert;
|
||||||
|
|
||||||
void EdgeLoopDelete(void) {
|
int EdgeLoopDelete(void) {
|
||||||
EdgeSlide(1, 1);
|
if(!EdgeSlide(1, 1)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
select_more();
|
select_more();
|
||||||
removedoublesflag(1,0.001);
|
removedoublesflag(1,0.001);
|
||||||
EM_select_flush();
|
EM_select_flush();
|
||||||
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
|
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int EdgeSlide(short immediate, float imperc)
|
int EdgeSlide(short immediate, float imperc)
|
||||||
|
Loading…
Reference in New Issue
Block a user