Fix bug 30696, circular mesh objects had wrong orientation.

Behavior now matches 2.62, circle, cone, and cylinder get first vertex
at 0 degrees.

Also fixed range for vertex property of add-cone and add-cylinder
operators, changed minumum from two to three.
This commit is contained in:
Nicholas Bishop 2012-03-27 10:28:06 +00:00
parent 6420dc23fd
commit 1e7bcece44
2 changed files with 4 additions and 4 deletions

View File

@ -506,7 +506,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op)
BMO_slot_mat4_get(op, "mat", mat);
phid = 2.0f * (float)M_PI / segs;
phi = .25f * (float)M_PI;
phi = 0;
if (cap_ends) {
vec[0] = vec[1] = 0.0f;
@ -579,7 +579,7 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op)
BMO_slot_mat4_get(op, "mat", mat);
phid = 2.0f * (float)M_PI / segs;
phi = 0.25f * (float)M_PI;
phi = 0;
depth *= 0.5f;
if (cap_ends) {

View File

@ -333,7 +333,7 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500);
RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500);
prop = RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
RNA_def_property_subtype(prop, PROP_DISTANCE);
prop = RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
@ -395,7 +395,7 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500);
RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500);
prop = RNA_def_float(ot->srna, "radius1", 1.0f, 0.0, FLT_MAX, "Radius 1", "", 0.001, 100.00);
RNA_def_property_subtype(prop, PROP_DISTANCE);
prop = RNA_def_float(ot->srna, "radius2", 0.0f, 0.0, FLT_MAX, "Radius 2", "", 0.001, 100.00);