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:
authorMartin Poirier <theeth@yahoo.com>2009-10-19 03:23:41 +0400
committerMartin Poirier <theeth@yahoo.com>2009-10-19 03:23:41 +0400
commite029e05646da87707667076ab95c547e3ce071a3 (patch)
treeddd0f46778ee98248ca86d83d1170b2ec6f5b665 /source/blender/editors/mesh/editmesh_add.c
parent5d97c9f595a4bff343782fc92c07129fd34a487b (diff)
[#19680] Add cap ends option for new cylinders in 2.5
Patch by Howard Brooks
Diffstat (limited to 'source/blender/editors/mesh/editmesh_add.c')
-rw-r--r--source/blender/editors/mesh/editmesh_add.c4
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)