forked from bartvdbraak/blender
Some fixes;
- Armature deform options "Envelope" and "Vertexgroup" didn't combine. One Vertexgroup added disabled all Envelopes - "Clear" option in WPaint Panel now sends refresh to deform - Same for Undo in Wpaint
This commit is contained in:
parent
af935e597f
commit
838d938522
@ -720,8 +720,7 @@ void armature_deform_verts(Object *armOb, Object *target, float (*vertexCos)[3],
|
||||
else
|
||||
dvert= NULL;
|
||||
|
||||
if(dvert) { // use weight groups
|
||||
MDeformVert *dvert = &dverts[i];
|
||||
if(dvert && dvert->totweight) { // use weight groups
|
||||
|
||||
for (j=0; j<dvert->totweight; j++){
|
||||
pchan = defnrToPC[dvert->dw[j].def_nr];
|
||||
|
@ -2932,6 +2932,7 @@ void do_fpaintbuts(unsigned short event)
|
||||
for(a=0; a<me->totvert; a++)
|
||||
remove_vert_defgroup (ob, defGroup, a);
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -732,10 +732,11 @@ static int calc_vp_alpha_dl(VPaint *vp, DerivedMesh *dm, int vert, short *mval)
|
||||
|
||||
void wpaint_undo (void)
|
||||
{
|
||||
Object *ob= OBACT;
|
||||
Mesh *me;
|
||||
MDeformVert *swapbuf;
|
||||
|
||||
me = get_mesh(OBACT);
|
||||
me = get_mesh(ob);
|
||||
if (!me)
|
||||
return;
|
||||
|
||||
@ -762,7 +763,7 @@ void wpaint_undo (void)
|
||||
/* now free previous mesh dverts */
|
||||
free_dverts(swapbuf, me->totvert);
|
||||
|
||||
DAG_object_flush_update(G.scene, OBACT, OB_RECALC_DATA);
|
||||
DAG_object_flush_update(G.scene, ob->parent, OB_RECALC_DATA);
|
||||
scrarea_do_windraw(curarea);
|
||||
|
||||
}
|
||||
@ -939,10 +940,6 @@ void weight_paint(void)
|
||||
/* if nothing was added yet, we make dverts and a vertex deform group */
|
||||
if (!me->dvert)
|
||||
create_dverts(me);
|
||||
if(ob->defbase.first==NULL) {
|
||||
add_defgroup(ob);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
}
|
||||
/* this happens on a Bone select, when no vgroup existed yet */
|
||||
if(ob->actdef==0) {
|
||||
if(ob->parent && (ob->parent->flag & OB_POSEMODE)) {
|
||||
@ -960,6 +957,10 @@ void weight_paint(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ob->defbase.first==NULL) {
|
||||
add_defgroup(ob);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
}
|
||||
|
||||
if(ob->lay & G.vd->lay); else error("Active object is not in this layer");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user