diff options
Diffstat (limited to 'source/blender/editors/armature/editarmature_sketch.c')
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 989070c1147..ce328ea8a82 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -1006,9 +1006,9 @@ void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float { float ray_start[3], ray_normal[3]; float delta = VecLenf(stk->points[i].p, stk->points[i + 1].p); - short pval[2]; + float pval[2]; - project_short_noclip(ar, stk->points[i].p, pval); + project_float(ar, stk->points[i].p, pval); viewray(ar, v3d, pval, ray_start, ray_normal); VecMulf(ray_normal, distance * progress / length); @@ -1076,10 +1076,13 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok float dist = FLT_MAX; float p[3]; float size = 0; + float mvalf[2]; BLI_freelistN(&sketch->depth_peels); sketch->depth_peels.first = sketch->depth_peels.last = NULL; + mvalf[0]= dd->mval[0]; + mvalf[1]= dd->mval[1]; peelObjectsContext(C, &sketch->depth_peels, dd->mval); if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS) @@ -1712,7 +1715,7 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok { SK_Intersection *isect = MEM_callocN(sizeof(SK_Intersection), "Intersection"); float ray_start[3], ray_end[3]; - short mval[2]; + float mval[2]; isect->gesture_index = g_i; isect->before = s_i; @@ -1720,8 +1723,8 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok isect->stroke = stk; isect->lambda = lambda; - mval[0] = (short)(vi[0]); - mval[1] = (short)(vi[1]); + mval[0] = vi[0]; + mval[1] = vi[1]; viewline(ar, v3d, mval, ray_start, ray_end); LineIntersectLine( stk->points[s_i].p, |