fix for own error in recent weight paint code, bound-box clip wasnt working.

This commit is contained in:
Campbell Barton
2013-01-01 14:20:59 +00:00
parent 2754ee1f62
commit 16afa704cc
2 changed files with 5 additions and 5 deletions

View File

@@ -859,7 +859,7 @@ static float calc_vp_strength_dl(VPaint *vp, ViewContext *vc, const float co[3],
{
float vertco[2];
if (ED_view3d_project_float_global(vc->ar,
if (ED_view3d_project_float_object(vc->ar,
co, vertco,
V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
{
@@ -2218,7 +2218,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
ED_region_tag_redraw(CTX_wm_region(C));
return;
}
vc = &wpd->vc;
ob = vc->obact;
me = ob->data;
@@ -3061,9 +3061,9 @@ static void gradientVert__mapFunc(void *userData, int index, const float co[3],
* the screen coords of the verts need to be cached because
* updating the mesh may move them about (entering feedback loop) */
if (grad_data->is_init) {
if (ED_view3d_project_float_global(grad_data->ar,
if (ED_view3d_project_float_object(grad_data->ar,
co, vs->sco,
V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
{
/* ok */
MDeformVert *dv = &me->dvert[index];

View File

@@ -110,7 +110,7 @@ eV3DProjStatus ED_view3d_project_base(struct ARegion *ar, struct Base *base)
/* perspmat is typically...
* - 'rv3d->perspmat', is_local == FALSE
* - 'rv3d->perspmatob', is_local == TRUE
* - 'rv3d->persmatob', is_local == TRUE
*/
static eV3DProjStatus ed_view3d_project__internal(ARegion *ar,
float perspmat[4][4], const int is_local, /* normally hidden */