diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-02-25 23:58:23 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-02-26 02:16:46 +0300 |
commit | 2724fad582676d2c164b05fe6fccf7a15d88adba (patch) | |
tree | 350f10451c9220f258eb3c60f5b5270c6c3d0d1a /source/blender/editors/sculpt_paint/paint_mask.c | |
parent | e9011100f75c22b3a9c9021fd49fb007efa03ed0 (diff) |
OpenGL: replace gluProject and gluUnProject, and simplify surrounding code.
Part of T49042.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_mask.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index a4887c579ac..b4938e0f7d8 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -251,7 +251,6 @@ int ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *r { Sculpt *sd = vc->scene->toolsettings->sculpt; BoundBox bb; - bglMats mats = {{0}}; float clip_planes[4][4]; float clip_planes_final[4][4]; ARegion *ar = vc->ar; @@ -269,8 +268,7 @@ int ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *r value = select ? 1.0 : 0.0; /* transform the clip planes in object space */ - view3d_get_transformation(vc->ar, vc->rv3d, vc->obact, &mats); - ED_view3d_clipping_calc(&bb, clip_planes, &mats, rect); + ED_view3d_clipping_calc(&bb, clip_planes, vc->ar, vc->obact, rect); negate_m4(clip_planes); BKE_sculpt_update_mesh_elements(scene, sd, ob, false, true); @@ -411,7 +409,6 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op) if (mcords) { float clip_planes[4][4], clip_planes_final[4][4]; BoundBox bb; - bglMats mats = {{0}}; Object *ob; ViewContext vc; LassoMaskData data; @@ -429,7 +426,6 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op) * calculations done. Bounding box PBVH collision is not computed against enclosing rectangle * of lasso */ view3d_set_viewcontext(C, &vc); - view3d_get_transformation(vc.ar, vc.rv3d, vc.obact, &mats); /* lasso data calculations */ data.vc = &vc; @@ -445,7 +441,7 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op) mcords, mcords_tot, mask_lasso_px_cb, &data); - ED_view3d_clipping_calc(&bb, clip_planes, &mats, &data.rect); + ED_view3d_clipping_calc(&bb, clip_planes, vc.ar, vc.obact, &data.rect); negate_m4(clip_planes); BKE_sculpt_update_mesh_elements(scene, sd, ob, false, true); |