diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-22 20:58:56 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-22 20:58:56 +0300 |
commit | e8209c36e61dda0b1f2a84c9d2567892c3de6a66 (patch) | |
tree | 5d3c00469b428ad45fc7b77185046d439021b720 /source/blender/editors/transform/transform_constraints.c | |
parent | 45f17e10ec5079ab94d6cf92aa5901c46f7c44aa (diff) |
Cleanup: Deduplicate code
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 68faddd2060..0a6e0d6b7f5 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -640,36 +640,22 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte BLI_snprintf(text, sizeof(text), ftext, spacename); switch (orientation) { - case V3D_ORIENT_GLOBAL: { - setConstraint(t, mode, text); - break; - } case V3D_ORIENT_LOCAL: setLocalConstraint(t, mode, text); break; case V3D_ORIENT_NORMAL: if (checkUseAxisMatrix(t)) { setAxisMatrixConstraint(t, mode, text); + break; } - else { - setConstraint(t, mode, text); - } - break; + ATTR_FALLTHROUGH; + case V3D_ORIENT_GLOBAL: case V3D_ORIENT_VIEW: - setConstraint(t, mode, text); - break; case V3D_ORIENT_CURSOR: - setConstraint(t, mode, text); - break; case V3D_ORIENT_GIMBAL: - setConstraint(t, mode, text); - break; case V3D_ORIENT_CUSTOM_MATRIX: - setConstraint(t, mode, text); - break; case V3D_ORIENT_CUSTOM: default: { - BLI_assert(orientation >= V3D_ORIENT_CUSTOM); setConstraint(t, mode, text); break; } |