diff options
author | Pratik Borhade <PratikPB2123> | 2021-03-16 15:08:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-16 15:10:32 +0300 |
commit | 4d3cdb32d399335dba72c180309c0d34f93cd533 (patch) | |
tree | 8e82883720decd501a0e0773112182c219cbcd9c /source/blender/editors/mesh/editmesh_add.c | |
parent | 6d011d0e27d79b9c9fc7570770f5af958706e63a (diff) |
Fix T86168: Add primitive Grid. Wrong number of subdivisions
Changes to increase subdivision by one along both axis (X and Y)
For example with x_segment = 3 and y_segment = 3.
There should be 16 vertices ((3 + 1) * (3 + 1)) for correct
number of subdivisions. Currently they are 3 * 3 = 9 vertices.
Ref D10699
Diffstat (limited to 'source/blender/editors/mesh/editmesh_add.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 582ff01173a..18e231893d4 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -137,8 +137,8 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) "verts.out", false, "create_grid x_segments=%i y_segments=%i size=%f matrix=%m4 calc_uvs=%b", - 1, - 1, + 0, + 0, RNA_float_get(op->ptr, "size") / 2.0f, creation_data.mat, calc_uvs)) { @@ -531,9 +531,9 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot) /* Note that if you use MESH_ADD_VERTS_MAXI for both x and y at the same time * you will still reach impossible values (10^12 vertices or so...). */ RNA_def_int( - ot->srna, "x_subdivisions", 10, 2, MESH_ADD_VERTS_MAXI, "X Subdivisions", "", 2, 1000); + ot->srna, "x_subdivisions", 10, 1, MESH_ADD_VERTS_MAXI, "X Subdivisions", "", 1, 1000); RNA_def_int( - ot->srna, "y_subdivisions", 10, 2, MESH_ADD_VERTS_MAXI, "Y Subdivisions", "", 2, 1000); + ot->srna, "y_subdivisions", 10, 1, MESH_ADD_VERTS_MAXI, "Y Subdivisions", "", 1, 1000); ED_object_add_unit_props_size(ot); ED_object_add_mesh_props(ot); |