diff options
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |