use the meshes mirror flag for weight painting
This commit is contained in:
parent
520e805dad
commit
4c6b66132e
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue