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:
Diffstat (limited to 'source/blender/editors/armature/editarmature_sketch.c')
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 4dd8e4bd6fa..f4bebfd85e0 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -929,7 +929,7 @@ static void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end,
float pval[2] = {0, 0};
ED_view3d_project_float_global(ar, stk->points[i].p, pval, V3D_PROJ_TEST_NOP);
- ED_view3d_win_to_ray(ar, v3d, pval, ray_start, ray_normal, false);
+ ED_view3d_win_to_ray(CTX_data_depsgraph(C), ar, v3d, pval, ray_start, ray_normal, false);
mul_v3_fl(ray_normal, distance * progress / length);
add_v3_v3(stk->points[i].p, ray_normal);
@@ -1486,6 +1486,7 @@ static int cmpIntersections(const void *i1, const void *i2)
/* returns the maximum number of intersections per stroke */
static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Stroke *gesture)
{
+ const Depsgraph *depsgraph = CTX_data_depsgraph(C);
ARegion *ar = CTX_wm_region(C);
ScrArea *sa = CTX_wm_area(C);
View3D *v3d = sa->spacedata.first;
@@ -1526,7 +1527,7 @@ static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, S
mval[0] = vi[0];
mval[1] = vi[1];
- ED_view3d_win_to_segment(ar, v3d, mval, ray_start, ray_end, true);
+ ED_view3d_win_to_segment(depsgraph, ar, v3d, mval, ray_start, ray_end, true);
isect_line_line_v3(stk->points[s_i].p,
stk->points[s_i + 1].p,