Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-11 13:44:46 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-11 13:44:46 +0300
commit2e3326c1533e992ef7eaa43ed876375af4db5de1 (patch)
treefe0adcbf314053bd3c079abd4692dea851231aac /source/blender/editors/sculpt_paint/paint_vertex.c
parent7fe52eedba00a3008d56ad0d689ed27fcf658220 (diff)
parente4f10565ea6b4a9015bd5a9e81b77d1d549e9b46 (diff)
Sculpt: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r24330:24483
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 582a0c149b4..1e316072dd5 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -42,7 +42,7 @@
#include "IMB_imbuf_types.h"
#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
+#include "BLI_math.h"
#include "BLI_ghash.h"
#include "DNA_anim_types.h"
@@ -1104,12 +1104,10 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */
/* verify if active weight group is also active bone */
par= modifiers_isDeformedByArmature(ob);
if(par && (par->mode & OB_MODE_POSE)) {
- bPoseChannel *pchan;
- for(pchan= par->pose->chanbase.first; pchan; pchan= pchan->next)
- if(pchan->bone->flag & BONE_ACTIVE)
- break;
- if(pchan)
- ED_vgroup_select_by_name(ob, pchan->name);
+ bArmature *arm= ob->data;
+
+ if(arm->act_bone)
+ ED_vgroup_select_by_name(ob, arm->act_bone->name);
}
}
else {
@@ -1381,9 +1379,9 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *event)
// if(ob->lay & v3d->lay); else error("Active object is not in this layer");
/* imat for normals */
- Mat4MulMat4(mat, ob->obmat, wpd->vc.rv3d->viewmat);
- Mat4Invert(imat, mat);
- Mat3CpyMat4(wpd->wpimat, imat);
+ mul_m4_m4m4(mat, ob->obmat, wpd->vc.rv3d->viewmat);
+ invert_m4_m4(imat, mat);
+ copy_m3_m4(wpd->wpimat, imat);
/* if mirror painting, find the other group */
if(me->editflag & ME_EDIT_MIRROR_X) {
@@ -1439,7 +1437,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
mval[0]-= vc->ar->winrct.xmin;
mval[1]-= vc->ar->winrct.ymin;
- Mat4SwapMat4(wpd->vc.rv3d->persmat, mat);
+ swap_m4m4(wpd->vc.rv3d->persmat, mat);
/* which faces are involved */
if(wp->flag & VP_AREA) {
@@ -1564,7 +1562,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
}
}
- Mat4SwapMat4(vc->rv3d->persmat, mat);
+ swap_m4m4(vc->rv3d->persmat, mat);
DAG_id_flush_update(ob->data, OB_RECALC_DATA);
ED_region_tag_redraw(vc->ar);
@@ -1797,9 +1795,9 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent
copy_vpaint_prev(vp, (unsigned int *)me->mcol, me->totface);
/* some old cruft to sort out later */
- Mat4MulMat4(mat, ob->obmat, vpd->vc.rv3d->viewmat);
- Mat4Invert(imat, mat);
- Mat3CpyMat4(vpd->vpimat, imat);
+ mul_m4_m4m4(mat, ob->obmat, vpd->vc.rv3d->viewmat);
+ invert_m4_m4(imat, mat);
+ copy_m3_m4(vpd->vpimat, imat);
return 1;
}
@@ -1873,14 +1871,14 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
else totindex= 0;
}
- Mat4SwapMat4(vc->rv3d->persmat, mat);
+ swap_m4m4(vc->rv3d->persmat, mat);
for(index=0; index<totindex; index++) {
if(indexar[index] && indexar[index]<=me->totface)
vpaint_paint_face(vp, vpd, ob, indexar[index]-1, mval);
}
- Mat4SwapMat4(vc->rv3d->persmat, mat);
+ swap_m4m4(vc->rv3d->persmat, mat);
/* was disabled because it is slow, but necessary for blur */
if(vp->mode == VP_BLUR)