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:
authorMatt Ebb <matt@mke3.net>2010-04-05 08:58:17 +0400
committerMatt Ebb <matt@mke3.net>2010-04-05 08:58:17 +0400
commitf8c2df7ce781a068b21dd7661b5dd93aa84d7658 (patch)
treef6c2468ced96ab60daaef5c9a89c8e9d5955d758 /source/blender/editors/mesh/editmesh_loop.c
parent76e483edef060de768a55dc3ded93458deb23240 (diff)
Fix [#21912] knife and subdivide tools do not split edges properly
Added back the 'corner cut pattern' as an operator property for subdivide operator. Not added for knife yet, since operator redo doesn't seem to be working at all - already logged in the tracker.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loop.c')
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index 05ce7d8c5cb..90de0a01eea 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -362,9 +362,9 @@ void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts)
fac= 1.0f;
// XXX if(fbutton(&fac, 0.0f, 5.0f, 10, 10, "Smooth:")==0) return;
fac= 0.292f*fac;
- esubdivideflag(obedit, em, SELECT,fac,0,B_SMOOTH,numcuts,SUBDIV_SELECT_LOOPCUT);
+ esubdivideflag(obedit, em, SELECT,fac,0,B_SMOOTH,numcuts, SUBDIV_CORNER_PATH, SUBDIV_SELECT_LOOPCUT);
} else {
- esubdivideflag(obedit, em, SELECT,0,0,0,numcuts,SUBDIV_SELECT_LOOPCUT);
+ esubdivideflag(obedit, em, SELECT,0,0,0,numcuts,SUBDIV_CORNER_PATH, SUBDIV_SELECT_LOOPCUT);
}
/* if this was a single cut, enter edgeslide mode */
if(numcuts == 1 && hasHidden == 0){
@@ -629,6 +629,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
int len=0;
short numcuts= RNA_int_get(op->ptr, "num_cuts");
short mode= RNA_int_get(op->ptr, "type");
+ int corner_cut_pattern= RNA_enum_get(op->ptr,"corner_cut_pattern");
/* edit-object needed for matrix, and ar->regiondata for projections to work */
if (ELEM3(NULL, obedit, ar, ar->regiondata))
@@ -686,9 +687,9 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
eed= eed->next;
}
- if (mode==KNIFE_MIDPOINT) esubdivideflag(obedit, em, SELECT, 0, 0, B_KNIFE, 1, SUBDIV_SELECT_ORIG);
- else if (mode==KNIFE_MULTICUT) esubdivideflag(obedit, em, SELECT, 0, 0, B_KNIFE, numcuts, SUBDIV_SELECT_ORIG);
- else esubdivideflag(obedit, em, SELECT, 0, 0, B_KNIFE|B_PERCENTSUBD, 1, SUBDIV_SELECT_ORIG);
+ if (mode==KNIFE_MIDPOINT) esubdivideflag(obedit, em, SELECT, 0, 0, B_KNIFE, 1, SUBDIV_CORNER_INNERVERT, SUBDIV_SELECT_INNER);
+ else if (mode==KNIFE_MULTICUT) esubdivideflag(obedit, em, SELECT, 0, 0, B_KNIFE, numcuts, SUBDIV_CORNER_INNERVERT, SUBDIV_SELECT_INNER);
+ else esubdivideflag(obedit, em, SELECT, 0, 0, B_KNIFE|B_PERCENTSUBD, 1, SUBDIV_CORNER_INNERVERT, SUBDIV_SELECT_INNER);
eed=em->edges.first;
while(eed){
@@ -729,6 +730,7 @@ void MESH_OT_knife_cut(wmOperatorType *ot)
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
RNA_def_int(ot->srna, "num_cuts", 1, 1, MAX_CUTS, "Number of Cuts", "Only for Multi-Cut", 1, MAX_CUTS);
+ // doesn't work atm.. RNA_def_enum(ot->srna, "corner_cut_pattern", corner_type_items, SUBDIV_CORNER_INNERVERT, "Corner Cut Pattern", "Topology pattern to use to fill a face after cutting across its corner");
/* internal */
RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX);