diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-03-08 09:52:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-03-08 09:54:52 +0300 |
commit | 9342f55d12f87dbc72e6953e0bc6c2564e57465f (patch) | |
tree | ef3d3baa82c2bbf4badd6f11592237df76c8744e /source/blender/editors/sculpt_paint | |
parent | 222a941a2bbd71dcaa1012cdea959954ca065c6a (diff) | |
parent | ecab7bef6989752ff1a8c5fd1eab7b5ab159ed46 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint')
9 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 3a43c7a6585..d2063d15ddf 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -1033,7 +1033,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) /* can't use stroke vc here because this will be called during * mouse over too, not just during a stroke */ ViewContext vc; - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); if (vc.rv3d && (vc.rv3d->rflag & RV3D_NAVIGATING)) { return; diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c index b175a33934a..5d4451dd3d8 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.c +++ b/source/blender/editors/sculpt_paint/paint_hide.c @@ -325,7 +325,7 @@ static void clip_planes_from_rect(bContext *C, BoundBox bb; view3d_operator_needs_opengl(C); - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); ED_view3d_clipping_calc(&bb, clip_planes, vc.ar, vc.obact, rect); negate_m4(clip_planes); } diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 5595f81dd4e..969bf8f37b1 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -760,7 +760,7 @@ static PaintOperation *texture_paint_init(bContext *C, wmOperator *op, const flo PaintOperation *pop = MEM_callocN(sizeof(PaintOperation), "PaintOperation"); /* caller frees */ Brush *brush = BKE_paint_brush(&settings->imapaint.paint); int mode = RNA_enum_get(op->ptr, "mode"); - view3d_set_viewcontext(C, &pop->vc); + ED_view3d_viewcontext_init(C, &pop->vc); copy_v2_v2(pop->prevmouse, mouse); copy_v2_v2(pop->startmouse, mouse); diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index 64969075d89..162c067166c 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -449,7 +449,7 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op) /* Calculations of individual vertices are done in 2D screen space to diminish the amount of * calculations done. Bounding box PBVH collision is not computed against enclosing rectangle * of lasso */ - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); /* lasso data calculations */ data.vc = &vc; diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 3982c9a3c30..861015375cb 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -698,7 +698,7 @@ PaintStroke *paint_stroke_new(bContext *C, Brush *br = stroke->brush = BKE_paint_brush(p); float zoomx, zoomy; - view3d_set_viewcontext(C, &stroke->vc); + ED_view3d_viewcontext_init(C, &stroke->vc); stroke->get_location = get_location; stroke->test_start = test_start; diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 6b14f97d80c..a45e33e4654 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -468,7 +468,7 @@ void paint_sample_color(bContext *C, ARegion *ar, int x, int y, bool texpaint_pr unsigned int totpoly = me->totpoly; if (dm->getLoopDataArray(dm, CD_MLOOPUV)) { - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); view3d_operator_needs_opengl(C); diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 5ecd530f5b7..f8ad943ffef 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1481,7 +1481,7 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float mo /* make mode data storage */ wpd = MEM_callocN(sizeof(struct WPaintData), "WPaintData"); paint_stroke_set_mode_data(stroke, wpd); - view3d_set_viewcontext(C, &wpd->vc); + ED_view3d_viewcontext_init(C, &wpd->vc); view_angle_limits_init(&wpd->normal_angle_precalc, vp->paint.brush->falloff_angle, (vp->paint.brush->flag & BRUSH_FRONTFACE_FALLOFF) != 0); @@ -2481,7 +2481,7 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f /* make mode data storage */ vpd = MEM_callocN(sizeof(*vpd), "VPaintData"); paint_stroke_set_mode_data(stroke, vpd); - view3d_set_viewcontext(C, &vpd->vc); + ED_view3d_viewcontext_init(C, &vpd->vc); view_angle_limits_init(&vpd->normal_angle_precalc, vp->paint.brush->falloff_angle, (vp->paint.brush->flag & BRUSH_FRONTFACE_FALLOFF) != 0); diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c index 72e2e7b323d..7ff9c3851ac 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c @@ -183,7 +183,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even Mesh *me; bool changed = false; - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); me = BKE_mesh_from_object(vc.obact); if (me && me->dvert && vc.v3d && vc.rv3d && (vc.obact->actdef != 0)) { @@ -298,7 +298,7 @@ static const EnumPropertyItem *weight_paint_sample_enum_itemf( ViewContext vc; Mesh *me; - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); me = BKE_mesh_from_object(vc.obact); if (me && me->dvert && vc.v3d && vc.rv3d && vc.obact->defbase.first) { @@ -367,7 +367,7 @@ static int weight_sample_group_exec(bContext *C, wmOperator *op) { int type = RNA_enum_get(op->ptr, "group"); ViewContext vc; - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); BLI_assert(type + 1 >= 0); vc.obact->actdef = type + 1; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 5333436f34f..2d847d53877 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4728,7 +4728,7 @@ bool sculpt_stroke_get_location(bContext *C, float out[3], const float mouse[2]) bool original; ViewContext vc; - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); ob = vc.obact; @@ -5940,7 +5940,7 @@ static void sample_detail(bContext *C, int ss_co[2]) float ray_start[3], ray_end[3], ray_normal[3], depth; SculptDetailRaycastData srd; float mouse[2] = {ss_co[0], ss_co[1]}; - view3d_set_viewcontext(C, &vc); + ED_view3d_viewcontext_init(C, &vc); sd = CTX_data_tool_settings(C)->sculpt; ob = vc.obact; |