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>2021-05-12 04:40:56 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-05-20 17:05:28 +0300
commit47f4f3c932b251268f2fcd56a924d5f005bcb8cd (patch)
tree6d3962978bb6aac3a5ce37051d8badf7e0af4f7f /source/blender/editors/transform/transform.c
parent4bb2a5b5cb700d4564603f882c750eca5544bde6 (diff)
Cleanup: Use enum to indicate the current orientation
Improves readability.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r--source/blender/editors/transform/transform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 2fbcbe22349..8546ec88715 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -782,7 +782,7 @@ static bool transform_event_modal_constraint(TransInfo *t, short modal_type)
}
else {
short orient_index = 1;
- if (t->orient_curr == 0 || ELEM(constraint_curr, -1, constraint_new)) {
+ if (t->orient_curr == O_DEFAULT || ELEM(constraint_curr, -1, constraint_new)) {
/* Successive presses on existing axis, cycle orientation modes. */
orient_index = (short)((t->orient_curr + 1) % (int)ARRAY_SIZE(t->orient));
}
@@ -1426,7 +1426,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
mat3_to_size(t->values_final, tmat);
}
- BLI_assert(t->orient_curr == 0);
+ BLI_assert(t->orient_curr == O_DEFAULT);
unit_m3(t->spacemtx);
t->orient[0].type = V3D_ORIENT_GLOBAL;
}