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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-03-23 07:10:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-23 07:10:44 +0400
commit4b52ad6a358f27eae312ff5b118204490f1d2435 (patch)
treebab27d28c10ca47cfc0680c2d823b0a2baa8e229 /source
parent174a46361fea26626cfaa622262a36c710624f5a (diff)
edge split bmesh operator wasnt accessible (defined but not used), for some reason it had a 'numcuts' option.
add edge split to mesh edge menu.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c19
-rw-r--r--source/blender/editors/mesh/mesh_ops.c1
2 files changed, 7 insertions, 13 deletions
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index 79f0288a063..6373ee57b99 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -1218,7 +1218,7 @@ void MESH_OT_vert_connect(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int editbmesh_edge_split(bContext *C, wmOperator *op)
+static int editbmesh_edge_split_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1226,13 +1226,13 @@ static int editbmesh_edge_split(bContext *C, wmOperator *op)
BMOperator bmop;
int len = 0;
- if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he numcuts=%i",
- BM_ELEM_SELECT, RNA_int_get(op->ptr, "number_cuts")))
+ if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he",
+ BM_ELEM_SELECT))
{
return OPERATOR_CANCELLED;
}
BMO_op_exec(bm, &bmop);
- len = BMO_slot_get(&bmop, "outsplit")->len;
+ len = BMO_slot_get(&bmop, "edgeout")->len;
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return OPERATOR_CANCELLED;
}
@@ -1245,23 +1245,16 @@ static int editbmesh_edge_split(bContext *C, wmOperator *op)
void MESH_OT_edge_split(wmOperatorType *ot)
{
- PropertyRNA *prop;
-
/* identifiers */
ot->name = "Edge Split";
ot->idname = "MESH_OT_edge_split";
/* api callbacks */
- ot->exec = editbmesh_edge_split;
+ ot->exec = editbmesh_edge_split_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
-
- prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, 10, "Number of Cuts", "", 1, INT_MAX);
-
- /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
- RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/****************** add duplicate operator ***************/
@@ -4567,7 +4560,7 @@ static int bridge_edge_loops(bContext *C, wmOperator *op)
void MESH_OT_bridge_edge_loops(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Bridge edge loops";
+ ot->name = "Bridge Two Edge Loops";
ot->description = "Make faces between two edge loops";
ot->idname = "MESH_OT_bridge_edge_loops";
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 447efc50bab..3803dcd168f 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -160,6 +160,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_bridge_edge_loops);
WM_operatortype_append(MESH_OT_inset);
+ WM_operatortype_append(MESH_OT_edge_split);
#ifdef WITH_GAMEENGINE
WM_operatortype_append(MESH_OT_navmesh_make);