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:
-rw-r--r--source/blender/editors/transform/transform_orientations.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 3b39f4d06ad..6d1bb9cc0de 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -521,23 +521,19 @@ short ED_transform_calc_orientation_from_type_ex(const bContext *C,
const int pivot_point)
{
switch (orientation_type) {
- case V3D_ORIENT_GLOBAL: {
- unit_m3(r_mat);
- return V3D_ORIENT_GLOBAL;
- }
case V3D_ORIENT_GIMBAL: {
if (ob && gimbal_axis(ob, r_mat)) {
- return V3D_ORIENT_GIMBAL;
+ break;
}
- /* if not gimbal, fall through to normal */
+ /* If not gimbal, fall through to normal. */
ATTR_FALLTHROUGH;
}
case V3D_ORIENT_NORMAL: {
if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
ED_getTransformOrientationMatrix(C, ob, obedit, pivot_point, r_mat);
- return V3D_ORIENT_NORMAL;
+ break;
}
- /* no break we define 'normal' as 'local' in Object mode */
+ /* No break we define 'normal' as 'local' in Object mode. */
ATTR_FALLTHROUGH;
}
case V3D_ORIENT_LOCAL: {
@@ -552,10 +548,14 @@ short ED_transform_calc_orientation_from_type_ex(const bContext *C,
else {
transform_orientations_create_from_axis(r_mat, UNPACK3(ob->obmat));
}
- return V3D_ORIENT_LOCAL;
+ break;
}
+ /* If not local, fall through to global. */
+ ATTR_FALLTHROUGH;
+ }
+ case V3D_ORIENT_GLOBAL: {
unit_m3(r_mat);
- return V3D_ORIENT_GLOBAL;
+ break;
}
case V3D_ORIENT_VIEW: {
if (rv3d != NULL) {
@@ -565,11 +565,11 @@ short ED_transform_calc_orientation_from_type_ex(const bContext *C,
else {
unit_m3(r_mat);
}
- return V3D_ORIENT_VIEW;
+ break;
}
case V3D_ORIENT_CURSOR: {
BKE_scene_cursor_rot_to_mat3(&scene->cursor, r_mat);
- return V3D_ORIENT_CURSOR;
+ break;
}
case V3D_ORIENT_CUSTOM_MATRIX: {
/* Do nothing. */;