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:
authorHans Goudey <h.goudey@me.com>2021-03-18 03:28:56 +0300
committerHans Goudey <h.goudey@me.com>2021-03-18 03:32:17 +0300
commit7bbd24e1d5c52a08205f0cc5921c305397dcac49 (patch)
tree2f93e627e8924de4199da0dd0c636ebd1b77152f /source/blender/editors/mesh/editmesh_add.c
parent9683976b0229e01aca3ae0f9293d9f837efecb1c (diff)
parentde6d6e171e950ab59e8499f310a91ee7fc18c9f8 (diff)
Merge branch 'master' into geometry-nodes-read-only-instances
Diffstat (limited to 'source/blender/editors/mesh/editmesh_add.c')
-rw-r--r--source/blender/editors/mesh/editmesh_add.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index d60d83850a5..18e231893d4 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -75,11 +75,8 @@ static Object *make_prim_init(bContext *C,
ED_object_new_primitive_matrix(C, obedit, loc, rot, r_creation_data->mat);
- if (scale && !equals_v3v3(scale, (const float[3]){1.0f, 1.0f, 1.0f})) {
- float scale_half[3];
- copy_v3_v3(scale_half, scale);
- mul_v3_fl(scale_half, 0.5f);
- rescale_m4(r_creation_data->mat, scale_half);
+ if (scale) {
+ rescale_m4(r_creation_data->mat, scale);
}
return obedit;
@@ -140,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)) {
@@ -534,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);