use the meshes mirror flag for weight painting
authorCampbell Barton <ideasman42@gmail.com>
Mon, 19 Oct 2009 13:09:13 +0000 (13:09 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 19 Oct 2009 13:09:13 +0000 (13:09 +0000)
source/blender/editors/armature/poseobject.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/makesdna/DNA_scene_types.h

index 57fe083b3191a3b97b64f7ef1fbbb3c9365428c6..331bd6fa28f7b867ba2f96b5e896aa2302f1aa43 100644 (file)
@@ -1154,7 +1154,7 @@ void pose_adds_vgroups(Scene *scene, Object *meshobj, int heatweights)
                return;
        }
 
-// XXX add_verts_to_dgroups(meshobj, poseobj, heatweights, (Gwp.flag & VP_MIRROR_X));
+// XXX add_verts_to_dgroups(meshobj, poseobj, heatweights, ((Mesh *)(meshobj->data))->editflag & ME_EDIT_MIRROR_X);
 
        if(heatweights)
                BIF_undo_push("Apply Bone Heat Weights to Vertex Groups");
index 5afc4954c9c489688dca7f6c1d70850aee4f61e6..65893a9ede865db6d05aa44dcf54a5658a5c0791 100644 (file)
@@ -394,7 +394,7 @@ void clear_wpaint_selectedfaces(Scene *scene)
        
        /* directly copied from weight_paint, should probaby split into a seperate function */
        /* if mirror painting, find the other group */          
-       if(wp->flag & VP_MIRROR_X) {
+       if(me->editflag & ME_EDIT_MIRROR_X) {
                bDeformGroup *defgroup= BLI_findlink(&ob->defbase, ob->actdef-1);
                if(defgroup) {
                        bDeformGroup *curdef;
@@ -437,7 +437,7 @@ void clear_wpaint_selectedfaces(Scene *scene)
                                                uw->weight= dw->weight; /* set the undo weight */
                                                dw->weight= paintweight;
                                                
-                                               if(wp->flag & VP_MIRROR_X) {    /* x mirror painting */
+                                               if(me->editflag & ME_EDIT_MIRROR_X) {   /* x mirror painting */
                                                        int j= mesh_get_x_mirror_vert(ob, faceverts[i]);
                                                        if(j>=0) {
                                                                /* copy, not paint again */
@@ -1009,7 +1009,7 @@ static void do_weight_paint_vertex(VPaint *wp, Object *ob, int index, int alpha,
        
        wpaint_blend(wp, dw, uw, (float)alpha/255.0, paintweight);
        
-       if(wp->flag & VP_MIRROR_X) {    /* x mirror painting */
+       if(me->editflag & ME_EDIT_MIRROR_X) {   /* x mirror painting */
                int j= mesh_get_x_mirror_vert(ob, index);
                if(j>=0) {
                        /* copy, not paint again */
@@ -1284,7 +1284,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *event)
        Mat3CpyMat4(wpd->wpimat, imat);
        
        /* if mirror painting, find the other group */
-       if(wp->flag & VP_MIRROR_X) {
+       if(me->editflag & ME_EDIT_MIRROR_X) {
                bDeformGroup *defgroup= BLI_findlink(&ob->defbase, ob->actdef-1);
                if(defgroup) {
                        bDeformGroup *curdef;
index 91f8e8d5c414d07d61dfd19f947366960965a329..38342be689a573d4ad951e10518bf635126000a7 100644 (file)
@@ -556,7 +556,7 @@ typedef struct VPaint {
 #define VP_SOFT                4
 #define VP_NORMALS     8
 #define VP_SPRAY       16
-#define VP_MIRROR_X    32
+// #define VP_MIRROR_X 32 // depricated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
 #define VP_HARD                64
 #define VP_ONLYVGROUP  128