diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-09 23:49:04 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-09 23:49:04 +0400 |
commit | 9241559ab4c223d30a949f2e06c776642b69715c (patch) | |
tree | 7e0f47e588eb5e515cc8080d412e04cc54187df5 /source/blender/editors/sculpt_paint | |
parent | d091856486cffc4351d6ded86de3c33afb3155b4 (diff) |
2.5: Various
* Weight paint: brush strength was changed to both define weight
and strength, this can't work, made them separate buttons.
* Allow adding particle system as modifier (fix crash).
* 3D view modal ops (zoom ..) could not be ended when invoked
from a button.
* Fix some warnings.
* Fix spelling in particle RNA property.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 0710079301b..74b5d5a4206 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -424,8 +424,9 @@ void clear_vpaint_selectedfaces(Scene *scene) /* fills in the selected faces with the current weight and vertex group */ void clear_wpaint_selectedfaces(Scene *scene) { - VPaint *wp= scene->toolsettings->wpaint; - float paintweight= wp->brush->alpha; + ToolSettings *ts= scene->toolsettings; + VPaint *wp= ts->wpaint; + float paintweight= ts->vgroup_weight; Mesh *me; MFace *mface; Object *ob; @@ -909,7 +910,7 @@ static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode) { ViewContext vc; - VPaint *wp= scene->toolsettings->wpaint; + ToolSettings *ts= scene->toolsettings; Object *ob= OBACT; Mesh *me= get_mesh(ob); int index; @@ -1019,20 +1020,20 @@ void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode) fac= MIN4(w1, w2, w3, w4); if(w1==fac) { dw= get_defweight(me->dvert+mface->v1, ob->actdef-1); - if(dw) wp->brush->alpha= dw->weight; else wp->brush->alpha= 0.0f; + if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f; } else if(w2==fac) { dw= get_defweight(me->dvert+mface->v2, ob->actdef-1); - if(dw) wp->brush->alpha= dw->weight; else wp->brush->alpha= 0.0f; + if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f; } else if(w3==fac) { dw= get_defweight(me->dvert+mface->v3, ob->actdef-1); - if(dw) wp->brush->alpha= dw->weight; else wp->brush->alpha= 0.0f; + if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f; } else if(w4==fac) { if(mface->v4) { dw= get_defweight(me->dvert+mface->v4, ob->actdef-1); - if(dw) wp->brush->alpha= dw->weight; else wp->brush->alpha= 0.0f; + if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f; } } } @@ -1308,7 +1309,7 @@ static int wpaint_modal(bContext *C, wmOperator *op, wmEvent *event) Object *ob= vc->obact; Mesh *me= ob->data; float mat[4][4]; - float paintweight= wp->brush->alpha; + float paintweight= ts->vgroup_weight; int *indexar= wpd->indexar; int totindex, index, alpha, totw; short mval[2]; @@ -1365,7 +1366,7 @@ static int wpaint_modal(bContext *C, wmOperator *op, wmEvent *event) if(wp->mode==VP_BLUR) paintweight= 0.0f; else - paintweight= wp->brush->alpha; + paintweight= ts->vgroup_weight; for(index=0; index<totindex; index++) { if(indexar[index] && indexar[index]<=me->totface) { |