diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-04 10:01:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-04 10:01:53 +0300 |
commit | d1dfed206b34b128bb0a972891bcc0a249176209 (patch) | |
tree | af7330755935b063d496b9af680c5fe04b359d6a /source/blender/bmesh | |
parent | 08f728a3e91a7c62946847e89632390c400d55ea (diff) |
Fix T52923: Circle diameter is in fact radius
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_opdefines.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_primitive.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index a55df234264..4f48dafd211 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -1684,7 +1684,7 @@ static BMOpDefine bmo_create_circle_def = { {{"cap_ends", BMO_OP_SLOT_BOOL}, /* whether or not to fill in the ends with faces */ {"cap_tris", BMO_OP_SLOT_BOOL}, /* fill ends with triangles instead of ngons */ {"segments", BMO_OP_SLOT_INT}, - {"diameter", BMO_OP_SLOT_FLT}, /* diameter of one end */ + {"radius", BMO_OP_SLOT_FLT}, /* Radius of the circle. */ {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ {{'\0'}}, diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index d8f83d786b4..95d61763902 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -1285,7 +1285,7 @@ void bmo_create_monkey_exec(BMesh *bm, BMOperator *op) void bmo_create_circle_exec(BMesh *bm, BMOperator *op) { - const float dia = BMO_slot_float_get(op->slots_in, "diameter"); + const float radius = BMO_slot_float_get(op->slots_in, "radius"); const int segs = BMO_slot_int_get(op->slots_in, "segments"); const bool cap_ends = BMO_slot_bool_get(op->slots_in, "cap_ends"); const bool cap_tris = BMO_slot_bool_get(op->slots_in, "cap_tris"); @@ -1315,8 +1315,8 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op) for (a = 0; a < segs; a++, phi += phid) { /* Going this way ends up with normal(s) upward */ - vec[0] = -dia * sinf(phi); - vec[1] = dia * cosf(phi); + vec[0] = -radius * sinf(phi); + vec[1] = radius * cosf(phi); vec[2] = 0.0f; mul_m4_v3(mat, vec); v1 = BM_vert_create(bm, vec, NULL, BM_CREATE_NOP); @@ -1351,7 +1351,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op) BMO_face_flag_enable(bm, f, FACE_NEW); if (calc_uvs) { - BM_mesh_calc_uvs_circle(bm, mat, dia, FACE_NEW, cd_loop_uv_offset); + BM_mesh_calc_uvs_circle(bm, mat, radius, FACE_NEW, cd_loop_uv_offset); } } |