svn merge -r 13382:13415 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / src / editobject.c
index cb1ed4c3e5aa9ba9af68a14bbfcb07d37015f502..a7b8400fb9db26748df81dd693ece52ba179f667 100644 (file)
@@ -5148,7 +5148,7 @@ void selectlinks_menu(void)
        /* If you modify this menu, please remember to update view3d_select_linksmenu
         * in header_view3d.c and the menu in toolbox.c
         */
-       nr= pupmenu("Select Linked%t|Object Ipo%x1|ObData%x2|Material%x3|Texture%x4|DupliGroup%x5");
+       nr= pupmenu("Select Linked%t|Object Ipo%x1|ObData%x2|Material%x3|Texture%x4|DupliGroup%x5|ParticleSystem%x6");
        
        if (nr <= 0) return;
        
@@ -5171,6 +5171,7 @@ void selectlinks(int nr)
         * Current Material: 3
         * Current Texture: 4
         * DupliGroup: 5
+        * PSys: 6
         */
        
        
@@ -5196,6 +5197,9 @@ void selectlinks(int nr)
        else if(nr==5) {
                if(ob->dup_group==NULL) return;
        }
+       else if(nr==6) {
+               if(ob->particlesystem.first==NULL) return;
+       }
        else return;
        
        base= FIRSTBASE;
@@ -5224,6 +5228,7 @@ void selectlinks(int nr)
                                                                if(tex==mat1->mtex[b]->tex) {
                                                                        base->flag |= SELECT;
                                                                        changed = 1;
+                                                                       break;
                                                                }
                                                        }
                                                }
@@ -5236,6 +5241,25 @@ void selectlinks(int nr)
                                         changed = 1;
                                }
                        }
+                       else if(nr==6) {
+                               /* loop through other, then actives particles*/
+                               ParticleSystem *psys;
+                               ParticleSystem *psys_act;
+                               
+                               for(psys=base->object->particlesystem.first; psys; psys=psys->next) {
+                                       for(psys_act=ob->particlesystem.first; psys_act; psys_act=psys_act->next) {
+                                               if (psys->part == psys_act->part) {
+                                                       base->flag |= SELECT;
+                                                       changed = 1;
+                                                       break;
+                                               }
+                                       }
+                                       
+                                       if (base->flag & SELECT) {
+                                               break;
+                                       }
+                               }
+                       }
                        base->object->flag= base->flag;
                }
                base= base->next;
@@ -5580,17 +5604,9 @@ void mirrormenu(void)
        if(G.f & G_PARTICLEEDIT) {
                PE_mirror_x(0);
        }
-       else if (G.obedit==0) {
-               mode=pupmenu("Mirror Axis %t|X Local%x4|Y Local%x5|Z Local%x6|");
-
-               if (mode==-1) return; /* return */
-               Mirror(mode); /* separating functionality from interface | call*/
-       }
        else {
-               mode=pupmenu("Mirror Axis %t|X Global%x1|Y Global%x2|Z Global%x3|%l|X Local%x4|Y Local%x5|Z Local%x6|%l|X View%x7|Y View%x8|Z View%x9|");
-
-               if (mode==-1) return; /* return */
-               Mirror(mode); /* separating functionality from interface | call*/
+               initTransform(TFM_MIRROR, CTX_NO_PET);
+               Transform();
        }
 }