Separate "content reordering" from "plain menus".
authorGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Tue, 16 Jun 2009 02:40:39 +0000 (02:40 +0000)
committerGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Tue, 16 Jun 2009 02:40:39 +0000 (02:40 +0000)
source/blender/editors/interface/interface.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_userdef.c

index 83c9fc2ac2db62a9c7c27be5fc83503fa7c9c9c9..9a06bd21ea261697c1d8fcaefcfcec4f4847556e 100644 (file)
@@ -2850,8 +2850,8 @@ void uiBlockFlipOrder(uiBlock *block)
        uiBut *but, *next;
        float centy, miny=10000, maxy= -10000;
 
-       /*if(U.uiflag & USER_PLAINMENUS)
-               return;*/
+       if(!(U.uiflag & USER_DIRECTIONALORDER))
+               return;
        
        for(but= block->buttons.first; but; but= but->next) {
                if(but->flag & UI_BUT_ALIGN) return;
index 87931f8e93da869a115bf9507356b17bd743431b..2b9592fca56ce2d0d3b14b6c448d78bf276429a1 100644 (file)
@@ -378,6 +378,7 @@ extern UserDef U; /* from blenkernel blender.c */
 #define USER_ZOOM_TO_MOUSEPOS  (1 << 20)
 #define USER_SHOW_FPS                  (1 << 21)
 #define USER_MMB_PASTE                 (1 << 22)
+#define USER_DIRECTIONALORDER  (1 << 23)
 
 /* Auto-Keying mode */
        /* AUTOKEY_ON is a bitflag */
index 64febd884f3400859fbaa34756fbcf54b1f6afc8..04006f51c7c6a16a1ed486a1572fe41810bed9e4 100644 (file)
@@ -1476,7 +1476,11 @@ static void rna_def_userdef_view(BlenderRNA *brna)
 
        prop= RNA_def_property(srna, "use_column_layout", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS);
-       RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox and do not flip the contents of any menu.");
+       RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox.");
+
+       prop= RNA_def_property(srna, "directional_menus", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DIRECTIONALORDER);
+       RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction.");
 
        /* snap to grid */
        prop= RNA_def_property(srna, "snap_translate", PROP_BOOLEAN, PROP_NONE);