Transform: re-revert new user-axis-first behavior
[blender.git] / source / blender / editors / transform / transform_generics.c
index c66cda57c57d0be2d58175319d8d6667f65cafb8..f27df3bba25891221bfbdb3b75cec4326a25b3a0 100644 (file)
@@ -1405,9 +1405,14 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
                t->orientation.index = 0;
                ARRAY_SET_ITEMS(
                                t->orientation.types,
-                               &t->orientation.user,
-                               /* V3D_MANIP_GLOBAL */
-                               NULL);
+                               NULL,
+                               &t->orientation.user);
+
+               /* Make second orientation local if both are global. */
+               if (t->orientation.user == V3D_MANIP_GLOBAL) {
+                       t->orientation.user_alt = V3D_MANIP_LOCAL;
+                       t->orientation.types[1] = &t->orientation.user_alt;
+               }
 
                /* exceptional case */
                if (t->around == V3D_AROUND_LOCAL_ORIGINS) {