== Transform orientation bugfix ==
[blender.git] / source / blender / src / header_view3d.c
index cb3cfce62c3d62bfac726074676d4d5177e0ac0e..26f5f3af888bb835dd13dbe1b4b11d31980b4d65 100644 (file)
@@ -5639,6 +5639,10 @@ void view3d_buttons(void)
                                xco+= XIC;
                        }
                        
+                       if (G.vd->twmode > (BIF_countTransformOrientation() - 1) + V3D_MANIP_CUSTOM) {
+                               G.vd->twmode = 0;
+                       }
+                       
                        str_menu = BIF_menustringTransformOrientation("Orientation");
                        uiDefButS(block, MENU, B_MAN_MODE, str_menu,xco,0,70,YIC, &G.vd->twmode, 0, 0, 0, 0, "Transform Orientation (ALT+Space)");
                        MEM_freeN(str_menu);