svn merge ^/trunk/blender -r42261:42290
[blender.git] / source / blender / editors / object / object_vgroup.c
index 94328259dc327725dea371f2597f6bbe37916442..6e3fab0385fb74a4d710f51433d2d4cda47b4588 100644 (file)
@@ -1577,13 +1577,21 @@ static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr,
                }
        }
        else {
-               /* dvert should always be the target */
+               /* dvert should always be the target, only swaps pointer */
                if(sel_mirr) {
                        SWAP(MDeformVert *, dvert, dvert_mirr);
                }
 
-               if(mirror_weights)
-                       defvert_copy(dvert, dvert_mirr);
+               if(mirror_weights) {
+                       if (all_vgroups) {
+                               defvert_copy(dvert, dvert_mirr);
+                       }
+                       else {
+                               defvert_copy_index(dvert, dvert_mirr, act_vgroup);
+                       }
+               }
+
+               /* flip map already modified for 'all_vgroups' */
                if(flip_vgroups) {
                        defvert_flip(dvert, flip_map, flip_map_len);
                }