Fix transform axis orientation cycling
authorCampbell Barton <ideasman42@gmail.com>
Wed, 28 Nov 2018 22:41:44 +0000 (09:41 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 28 Nov 2018 22:41:44 +0000 (09:41 +1100)
This ignored operator defined orientation.

source/blender/editors/transform/transform_generics.c

index 9f739765d9c7b81b1ed234de5a88d88eed00a6a6..ba5b81ae641be6e7c8ab0becc114a762b277e7ac 100644 (file)
@@ -1399,13 +1399,6 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
                t->orientation.custom = BKE_scene_transform_orientation_find(
                        t->scene, t->scene->orientation_index_custom);
 
-               t->orientation.index = 0;
-               ARRAY_SET_ITEMS(
-                       t->orientation.types,
-                       V3D_MANIP_GLOBAL,  /* Value isn't used (first index is no constraint). */
-                       t->orientation.user,
-                       V3D_MANIP_GLOBAL);
-
                /* exceptional case */
                if (t->around == V3D_AROUND_LOCAL_ORIGINS) {
                        if (ELEM(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL)) {
@@ -1520,6 +1513,13 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
                t->orientation.custom = custom_orientation;
        }
 
+       t->orientation.index = 0;
+       ARRAY_SET_ITEMS(
+               t->orientation.types,
+               V3D_MANIP_GLOBAL,  /* Value isn't used (first index is no constraint). */
+               t->orientation.user,
+               V3D_MANIP_GLOBAL);
+
        if (op && ((prop = RNA_struct_find_property(op->ptr, "release_confirm")) &&
                   RNA_property_is_set(op->ptr, prop)))
        {