diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-31 20:04:03 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-31 20:04:03 +0400 |
commit | c3a7db28d31780329f8402f3f26c7bd575031474 (patch) | |
tree | f206c22ced73ce277560776a0e46da5be2eee180 /source/blender/editors/object | |
parent | b04cd3a76561f17ef0951837ae0ea169e563a571 (diff) |
Fix #31657: adding mesh objects did not take units into account for the grid
scale that sets the default size.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 699b731bc15..159f75b60e6 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -166,6 +166,7 @@ void ED_object_base_init_transform(bContext *C, Base *base, const float loc[3], float ED_object_new_primitive_matrix(bContext *C, Object *obedit, const float loc[3], const float rot[3], float primmat[][4]) { + Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); float mat[3][3], rmat[3][3], cmat[3][3], imat[3][3]; @@ -186,7 +187,9 @@ float ED_object_new_primitive_matrix(bContext *C, Object *obedit, invert_m3_m3(imat, mat); mul_m3_v3(imat, primmat[3]); - if (v3d) return v3d->grid; + if (v3d) + return ED_view3d_grid_scale(scene, v3d, NULL); + return 1.0f; } |