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:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-09-25 01:16:41 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-09-25 16:24:05 +0300
commit388b9162469650c7b0523c2fb9c88bbe2dee1567 (patch)
tree0aedf3c08117091d6092b3a630deb5e0df22b34e /source/blender/editors/transform/transform_orientations.c
parentd5a6b3b18c5d6c751b6b0091453d836313dbcde1 (diff)
Fix T80937: Changing the contrain axis does not return to the scene orientation
This was the behavior in old versions of blender. During a transformation operation, when pressing a contrain key, the chosen orientation is that of the scene. If you press the same key, the orientation changes to Global or Local. However, if you choose another contrain axis with the orientation changed, the orientation does not return to the set for the scene. It remains Global or Local. Now when changing a contrain axis, no matter what the current orientation is, it always returns to the scene orientation.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r--source/blender/editors/transform/transform_orientations.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 276d9381a0b..dc693bd6b15 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -616,12 +616,17 @@ const char *transform_orientations_spacename_get(TransInfo *t, const short orien
void transform_orientations_current_set(TransInfo *t, const short orient_index)
{
+ if (t->orient_curr == orient_index) {
+ return;
+ }
+
const short orientation = t->orient[orient_index].type;
const char *spacename = transform_orientations_spacename_get(t, orientation);
BLI_strncpy(t->spacename, spacename, sizeof(t->spacename));
copy_m3_m3(t->spacemtx, t->orient[orient_index].matrix);
invert_m3_m3(t->spacemtx_inv, t->spacemtx);
+ t->orient_curr = orient_index;
}
/**