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/curve/editcurve_query.c')
-rw-r--r--source/blender/editors/curve/editcurve_query.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/source/blender/editors/curve/editcurve_query.c b/source/blender/editors/curve/editcurve_query.c
index 5bc3010678d..684840775c3 100644
--- a/source/blender/editors/curve/editcurve_query.c
+++ b/source/blender/editors/curve/editcurve_query.c
@@ -88,13 +88,14 @@ static void ED_curve_pick_vert__do_closest(void *userData,
UNUSED_VARS_NDEBUG(handles_visible);
}
-bool ED_curve_pick_vert(ViewContext *vc,
- short sel,
- Nurb **r_nurb,
- BezTriple **r_bezt,
- BPoint **r_bp,
- short *r_handle,
- Base **r_base)
+bool ED_curve_pick_vert_ex(ViewContext *vc,
+ short sel,
+ float dist_px,
+ Nurb **r_nurb,
+ BezTriple **r_bezt,
+ BPoint **r_bp,
+ short *r_handle,
+ Base **r_base)
{
/* (sel == 1): selected gets a disadvantage */
/* in nurb and bezt or bp the nearest is written */
@@ -109,7 +110,7 @@ bool ED_curve_pick_vert(ViewContext *vc,
bool is_changed;
} data = {NULL};
- data.dist = ED_view3d_select_dist_px();
+ data.dist = dist_px;
data.hpoint = 0;
data.select = sel;
data.mval_fl[0] = vc->mval[0];
@@ -143,6 +144,18 @@ bool ED_curve_pick_vert(ViewContext *vc,
return (data.bezt || data.bp);
}
+bool ED_curve_pick_vert(ViewContext *vc,
+ short sel,
+ Nurb **r_nurb,
+ BezTriple **r_bezt,
+ BPoint **r_bp,
+ short *r_handle,
+ Base **r_base)
+{
+ return ED_curve_pick_vert_ex(
+ vc, sel, ED_view3d_select_dist_px(), r_nurb, r_bezt, r_bp, r_handle, r_base);
+}
+
/** \} */
/* -------------------------------------------------------------------- */