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:
Diffstat (limited to 'source/blender/editors/transform/transform_mode.c')
-rw-r--r--source/blender/editors/transform/transform_mode.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c
index 8df95222fa1..b9fb8a86752 100644
--- a/source/blender/editors/transform/transform_mode.c
+++ b/source/blender/editors/transform/transform_mode.c
@@ -1232,14 +1232,24 @@ void transform_mode_default_modal_orientation_set(TransInfo *t, int type)
return;
}
+ View3D *v3d = NULL;
RegionView3D *rv3d = NULL;
if ((type == V3D_ORIENT_VIEW) && (t->spacetype == SPACE_VIEW3D) && t->region &&
(t->region->regiontype == RGN_TYPE_WINDOW)) {
+ v3d = t->view;
rv3d = t->region->regiondata;
}
t->orient[O_DEFAULT].type = ED_transform_calc_orientation_from_type_ex(
- NULL, t->orient[O_DEFAULT].matrix, NULL, rv3d, NULL, NULL, type, 0);
+ t->scene,
+ t->view_layer,
+ v3d,
+ rv3d,
+ NULL,
+ NULL,
+ type,
+ V3D_AROUND_CENTER_BOUNDS,
+ t->orient[O_DEFAULT].matrix);
if (t->orient_curr == O_DEFAULT) {
/* Update Orientation. */