Orange: tuesday sync with bf-blender
[blender.git] / source / blender / src / space.c
index 5c07f1ba341badd98ae0f5c1391e37a6e39a35fc..9228455371e528eab8c45f60ee582cc7deea48fd 100644 (file)
@@ -89,6 +89,7 @@
 #include "BIF_editarmature.h"
 #include "BIF_editconstraint.h"
 #include "BIF_editfont.h"
+#include "BIF_editgroup.h"
 #include "BIF_editkey.h"
 #include "BIF_editlattice.h"
 #include "BIF_editmesh.h"
@@ -577,31 +578,10 @@ static void select_parent(void)   /* Makes parent active and de-selected OBACT */
        }
 }
 
-
-void select_group_menu(void)
-{
-       char *str;
-       short nr;
-
-       /* make menu string */
-       
-       str= MEM_mallocN(160, "groupmenu");
-       strcpy(str, "Select Grouped%t|Children%x1|"
-                   "Immediate Children%x2|Parent%x3|"
-                   "Objects on Shared Layers%x4");
-
-       /* here we go */
-       
-       nr= pupmenu(str);
-       MEM_freeN(str);
-       
-       select_group(nr);
-}
-
-void select_group(short nr)
+void select_grouped(short nr)
 {
        Base *base;
-
+       
        if(nr==4) {
                base= FIRSTBASE;
                while(base) {
@@ -623,6 +603,27 @@ void select_group(short nr)
        allqueue(REDRAWIPO, 0);
 }
 
+static void select_grouped_menu(void)
+{
+       char *str;
+       short nr;
+
+       /* make menu string */
+       
+       str= MEM_mallocN(160, "groupmenu");
+       strcpy(str, "Select Grouped%t|Children%x1|"
+                   "Immediate Children%x2|Parent%x3|"
+                   "Objects on Shared Layers%x4");
+
+       /* here we go */
+       
+       nr= pupmenu(str);
+       MEM_freeN(str);
+       
+       select_grouped(nr);
+}
+
+
 static unsigned short convert_for_nonumpad(unsigned short event)
 {
        if (event>=ZEROKEY && event<=NINEKEY) {
@@ -1262,10 +1263,9 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                                
                                break;
                        case GKEY:
-                               /* RMGRP if(G.qual & LR_CTRLKEY) add_selected_to_group();
-                               else if(G.qual & LR_ALTKEY) rem_selected_from_group(); */
-                               if((G.qual==LR_SHIFTKEY))
-                                       select_group_menu();
+                               if(G.qual & LR_CTRLKEY) group_operation_with_menu();
+                               else if((G.qual==LR_SHIFTKEY))
+                                       select_grouped_menu();
                                else if(G.qual==LR_ALTKEY) {
                                        if(okee("Clear location")) {
                                                clear_object('g');
@@ -3867,8 +3867,7 @@ static void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                                        sample_vpaint();
                                break;
                        case AKEY:
-                               if((G.qual==0))
-                                       select_swap_tface_uv();
+                               select_swap_tface_uv();
                                break;
                        case BKEY:
                                if(G.qual==LR_SHIFTKEY)
@@ -3956,6 +3955,8 @@ static void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                                        stitch_uv_tface(0);
                                else if(G.qual==LR_SHIFTKEY)
                                        stitch_uv_tface(1);
+                               else if(G.qual==LR_CTRLKEY)
+                                       minimize_stretch_tface_uv();
                                break;
                        case WKEY:
                                weld_align_menu_tface_uv();