From e029e05646da87707667076ab95c547e3ce071a3 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 18 Oct 2009 23:23:41 +0000 Subject: [#19680] Add cap ends option for new cylinders in 2.5 Patch by Howard Brooks --- source/blender/editors/mesh/editmesh_add.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/mesh/editmesh_add.c') diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index d703ba1fb35..bb340c450d7 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -1415,7 +1415,8 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op) { make_prim_ext(C, PRIM_CYLINDER, RNA_int_get(op->ptr, "vertices"), 0, 0, RNA_float_get(op->ptr,"radius"), - RNA_float_get(op->ptr, "depth"), 1, 1); + RNA_float_get(op->ptr, "depth"), 1, + RNA_boolean_get(op->ptr, "cap_ends")); return OPERATOR_FINISHED; } @@ -1438,6 +1439,7 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot) RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500); RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); RNA_def_float(ot->srna, "depth", 1.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00); + RNA_def_boolean(ot->srna, "cap_ends", 1, "Cap Ends", ""); } static int add_primitive_tube_exec(bContext *C, wmOperator *op) -- cgit v1.2.3