== Transform orientation bugfix ==
authorMartin Poirier <theeth@yahoo.com>
Wed, 14 May 2008 09:30:27 +0000 (09:30 +0000)
committerMartin Poirier <theeth@yahoo.com>
Wed, 14 May 2008 09:30:27 +0000 (09:30 +0000)
Fallback to global if the selected orientation doesn't exists.

This only happens when switching between scenes or screens(orientations are per view3d)

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);