40#define FOREACH_SELECTED_BEZT_BEGIN(bezt, nurbs) \
41 for (Nurb &nu : nurbs) { \
42 if (nu.type == CU_BEZIER) { \
43 for (int i = 0; i < nu.pntsu; i++) { \
44 BezTriple *bezt = nu.bezt + i; \
45 if (BEZT_ISSEL_ANY(bezt) && !bezt->hide) {
47#define FOREACH_SELECTED_BEZT_END \
51 BKE_nurb_handles_calc(&nu); \
56#define SEL_DIST_FACTOR 0.2f
127 {
HD_AUTO,
"AUTO", 0,
"Auto",
""},
128 {
HD_VECT,
"VECTOR", 0,
"Vector",
""},
129 {0,
nullptr, 0,
nullptr,
nullptr},
139 {
OFF,
"OFF", 0,
"None",
""},
140 {
ON_PRESS,
"ON_PRESS", 0,
"On Press",
"Move handles after closing the spline"},
141 {
ON_CLICK,
"ON_CLICK", 0,
"On Click",
"Spline closes on release if not dragged"},
142 {0,
nullptr, 0,
nullptr,
nullptr},
149 const float eps = 1e-6f;
156 const float *plane_co = vc->
obedit->object_to_world().location();
168 float location_test[3];
189 const float pos_2d[2],
190 const float depth[3],
200 const float depth[3],
203 const float pos_2d_fl[2] = {
float(pos_2d[0]),
float(pos_2d[1])};
208 const float pos_3d[3],
261 const float disp_2d[2],
263 const bool link_handles,
264 const bool lock_angle)
273 float pos[2], dst[2];
288 const int other_handle = bezt_idx == 2 ? 0 : 2;
317 const bool bezt_only,
322 for (
Nurb &nu : *nurbs) {
324 for (
int i = 0; i < nu.pntsu; i++) {
351 else if (!bezt_only) {
352 for (
int i = 0; i < nu.pntsu; i++) {
353 if (!nu.bp->hide && (nu.bp + i)->f1 &
SELECT) {
373 ListBaseT<Nurb> *nurbs,
374 const bool bezt_only)
387 float mval_3d[3], center_mid[3];
393 for (
Nurb &nu : *nurbs) {
395 for (
int i = 0; i < nu.pntsu; i++) {
408 vc, bezt, 0, disp_2d,
distance, link_handles, lock_angle);
412 vc, bezt, 2, disp_2d,
distance, link_handles, lock_angle);
418 else if (!bezt_only) {
419 for (
int i = 0; i < nu.pntsu; i++) {
422 float pos[2], dst[2];
440 ListBaseT<Nurb> *nurbs = &editnurb->
nurbs;
442 if (cu->
actnu == nu_index) {
473 const ListBaseT<Nurb> *nurbs,
474 const float point[2],
485 int closest_handle = 0;
487 Nurb *closest_bezt_nu =
nullptr;
490 BPoint *closest_bp =
nullptr;
491 Nurb *closest_bp_nu =
nullptr;
493 for (
Nurb &nu : *nurbs) {
495 for (
int i = 0; i < nu.pntsu; i++) {
498 int start = 0, end = 3;
510 for (
int j = start; j < end; j++) {
513 if (dist < min_dist_bezt) {
514 min_dist_bezt = dist;
516 closest_bezt_nu = ν
524 for (
int i = 0; i < nu.pntsu; i++) {
531 if (dist < min_dist_bp) {
543 if (min_dist_bezt < threshold_dist || min_dist_bp < threshold_dist) {
544 if (min_dist_bp < min_dist_bezt) {
546 *r_nu = closest_bp_nu;
549 *r_bezt = closest_bezt;
550 *r_bezt_idx = closest_handle;
551 *r_nu = closest_bezt_nu;
563 const float parameter,
566 float tmp1[3], tmp2[3], tmp3[3];
579 float handle_prev[3],
580 float new_left_handle[3],
581 float new_right_handle[3],
582 float handle_next[3],
583 const float point_next[3],
584 const float parameter)
586 float center_point[3];
587 interp_v3_v3v3(center_point, handle_prev, handle_next, parameter);
590 interp_v3_v3v3(new_left_handle, handle_prev, center_point, parameter);
591 interp_v3_v3v3(new_right_handle, center_point, handle_next, parameter);
616 if (index < nu->pntsu) {
626 next_bezt = new_bezt_array;
629 next_bezt = new_bezt + 1;
640 (new_bezt - 1)->vec[2],
647 MEM_delete(nu->
bezt);
648 nu->
bezt = new_bezt_array;
671 if (index < nu->pntsu) {
681 next_bp = new_bp_array;
684 next_bp = new_bp + 1;
693 nu->
bp = new_bp_array;
711 const float point1[2],
712 const float point2[2],
714 const int resolu_idx,
719 float edge[2], vec1[2], vec2[2];
723 const float len_vec1 =
len_v2(vec1);
724 const float len_vec2 =
len_v2(vec2);
725 const float dot1 =
dot_v2v2(edge, vec1);
726 const float dot2 =
dot_v2v2(edge, vec2);
731 if ((dot1 > 0) == (dot2 > 0)) {
733 if (*r_min_dist > perp_dist) {
734 *r_min_dist = perp_dist;
735 *r_min_i = point_idx;
736 *r_param = resolu_idx + len_vec1 *
cos_v2v2v2(point, point1, point2) /
len_v2(edge);
740 if (*r_min_dist > len_vec2) {
741 *r_min_dist = len_vec2;
742 *r_min_i = point_idx;
743 *r_param = resolu_idx;
754 float min_dist = cd->
min_dist, param = 0.0f;
759 for (
int i = 0; i < end; i++) {
766 for (
int j = 0; j < 3; j++) {
776 float point1[2], point2[2];
778 const float len_vec1 =
len_v2v2(point, point1);
780 if (min_dist > len_vec1) {
786 for (
int j = 0; j < resolu; j++) {
802 float point1[2], point2[2];
804 for (
int i = 0; i < end; i++) {
821 const ListBaseT<Nurb> *nurbs,
822 const float point[2],
823 const float sel_dist,
827 for (
Nurb &nu : *nurbs) {
843 cd.
mval[0] =
event->mval[0];
844 cd.
mval[1] =
event->mval[1];
857 if (near_spline && !cd.
nurb->
hide) {
900 for (
Nurb &nu : *nurbs) {
906 if (*r_bezt || *r_bp) {
919 a = nu.pntsu * nu.pntsv;
922 if (*r_bezt || *r_bp) {
937 ListBaseT<Nurb> *nurbs,
939 const float disp_3d[3])
942 for (
Nurb &nu1 : *nurbs) {
944 BezTriple *last_bezt = nu1.bezt + nu1.pntsu - 1;
958 MEM_delete(nu1.bezt);
975 MEM_delete(nu1.bezt);
983 cu->
actnu = nu_index;
992 MEM_delete(nu1.bezt);
995 cu->
actnu = nu_index;
1004 BPoint *last_bp = nu1.bp + nu1.pntsu - 1;
1005 const bool first_sel = nu1.bp->
f1 &
SELECT;
1006 const bool last_sel = last_bp->
f1 &
SELECT && nu1.pntsu > 1;
1016 add_v3_v3((new_bp + nu1.pntsu + 1)->vec, disp_3d);
1032 cu->
actnu = nu_index;
1035 else if (last_sel) {
1041 add_v3_v3((new_bp + nu1.pntsu)->vec, disp_3d);
1046 cu->
actnu = nu_index;
1060 for (
Nurb &nu1 : *nurbs) {
1061 if (nu1.pntsu > 1) {
1069 end = nu1.pntsu - 1;
1071 for (
int i = start; i < end; i++) {
1076 (nu1.bp + i)->f1 &= ~
SELECT;
1097 float center[3] = {0.0f, 0.0f, 0.0f};
1121 Nurb *old_last_nu = editnurb->
nurbs.last();
1123 Nurb *new_last_nu = editnurb->
nurbs.last();
1125 if (old_last_nu != new_last_nu) {
1129 static_cast<const void *
>(new_last_nu->
bezt) :
1130 static_cast<const void *
>(new_last_nu->
bp));
1137 bezt->h1 = extrude_handle;
1138 bezt->h2 = extrude_handle;
1150 const float sel_dist)
1196 const float t_sq = t * t;
1197 const float t_cu = t_sq * t;
1198 const float one_minus_t = 1 - t;
1199 const float one_minus_t_sq = one_minus_t * one_minus_t;
1200 const float one_minus_t_cu = one_minus_t_sq * one_minus_t;
1224 const float denom = 3.0f * one_minus_t * t_sq;
1225 k1[0] = (mouse_3d[0] - one_minus_t_cu * bezt1->
vec[1][0] - t_cu * bezt2->
vec[1][0]) / denom;
1226 k1[1] = (mouse_3d[1] - one_minus_t_cu * bezt1->
vec[1][1] - t_cu * bezt2->
vec[1][1]) / denom;
1227 k1[2] = (mouse_3d[2] - one_minus_t_cu * bezt1->
vec[1][2] - t_cu * bezt2->
vec[1][2]) / denom;
1241 float handle_vec[3];
1256 float handle_vec[3];
1303 const bool found_point = nu !=
nullptr;
1305 bool deleted =
false;
1312 if (next_bezt && prev_bezt) {
1314 const uint span_step[2] = {
uint(bez_index),
uint(bez_index)};
1323 if (nu->
pntsu == 0) {
1341 ListBaseT<Nurb> *nurbs)
1346 if (nu.pntsu == 1) {
1349 if (nu.bezt == bezt) {
1353 else if (nu.bezt + nu.pntsu - 1 == bezt) {
1373 const float disp_fl[2] = {
float(displacement[0]),
float(displacement[1])};
1375 vc, adj_bezt, bezt_idx, disp_fl, 0.0f,
false,
false);
1389 if (sel_bezt || (sel_bp && sel_nu->
pntsu > 2)) {
1390 const bool is_bezt_endpoint = ((sel_nu->
type ==
CU_BEZIER) &&
1394 if (!(is_bezt_endpoint || is_bp_endpoint)) {
1406 vc, &(cu->
editnurb->
nurbs), mval_fl, &nu, &bezt, &bp, &bezt_idx);
1461 if (bezt_idx == 0) {
1473 else if (bezt_idx == 2) {
1515 "FREE_ALIGN_TOGGLE",
1517 "Free-Align Toggle",
1518 "Move handle of newly added point freely"},
1522 "Move Adjacent Handle",
1523 "Move the closer handle of the adjacent vertex"},
1527 "Move Entire Point",
1528 "Move the entire point using its handles"},
1533 "Mirror the movement of one handle onto the other"},
1538 "Move the handle along its current angle"},
1539 {0,
nullptr, 0,
nullptr,
nullptr},
1589 const int close_spline_method =
RNA_enum_get(op->
ptr,
"close_spline_method");
1603 if (cpd->
msd ==
nullptr) {
1689 else if (extrude_point) {
1695 if (!cpd->
changed && toggle_vector) {
1699 if (bezt_idx == 1 && cycle_handle_type) {
1727 else if (select_point) {
1732 if (cpd->
msd !=
nullptr) {
1733 MEM_delete(cpd->
msd);
1770 const int close_spline_method =
RNA_enum_get(op->
ptr,
"close_spline_method");
1789 &vc, nurbs, mval_fl, &nu1, &bezt1, &bp1, &bezt_idx);
1791 if (move_point && nu1 && !nu1->
hide &&
1821 if (insert_point && !move_seg) {
1826 else if (extrude_point) {
1840 ot->
name =
"Curve Pen";
1841 ot->
idname =
"CURVE_OT_pen";
1859 "Add a point connected to the last selected point");
1864 "Extrude Handle Type",
1865 "Type of the extruded handle");
1866 RNA_def_boolean(ot->
srna,
"delete_point",
false,
"Delete Point",
"Delete an existing point");
1868 ot->
srna,
"insert_point",
false,
"Insert Point",
"Insert Point into a curve segment");
1870 ot->
srna,
"move_segment",
false,
"Move Segment",
"Move an existing curve segment");
1872 ot->
srna,
"select_point",
false,
"Select Point",
"Select a point or its handles");
1873 RNA_def_boolean(ot->
srna,
"move_point",
false,
"Move Point",
"Move a point or its handles");
1878 "Make a spline cyclic by clicking endpoints");
1880 "close_spline_method",
1883 "Close Spline Method",
1884 "The condition for close spline to activate");
1886 ot->
srna,
"toggle_vector",
false,
"Toggle Vector",
"Toggle between Vector and Auto handles");
1888 "cycle_handle_type",
1890 "Cycle Handle Type",
1891 "Cycle between all four handle types");
#define BEZT_DESEL_IDX(bezt, i)
#define BEZT_ISSEL_IDX(bezt, i)
#define BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt)
#define BEZT_ISSEL_ANY(bezt)
#define BEZT_DESEL_ALL(bezt)
#define BEZT_SEL_IDX(bezt, i)
Read Blender memory allocation and freeing.
#define FOREACH_SELECTED_BEZT_END
#define FOREACH_SELECTED_BEZT_BEGIN(bezt, nurbs)
float distance(float, float) RET
bool isect_ray_plane_v3_factor(const float ray_origin[3], const float ray_direction[3], const float plane_co[3], const float plane_no[3], float *r_lambda)
MINLINE float min_ff(float a, float b)
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
static void calculate_new_bezier_point(const float point_prev[3], float handle_prev[3], float new_left_handle[3], float new_right_handle[3], float handle_next[3], const float point_next[3], const float parameter)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BKE_curve_nurb_vert_active_set(Curve *cu, const Nurb *nu, const void *vert)
static bool delete_point_under_mouse(const ViewContext *vc, const wmEvent *event)
static void get_first_selected_point(Curve *cu, View3D *v3d, Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp)
void ED_curve_bpcpy(EditNurb *editnurb, BPoint *dst, BPoint *src, int count)
int BKE_curve_nurb_vert_index_get(const Nurb *nu, const void *vert)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
int RNA_enum_get(PointerRNA *ptr, const char *name)
static void toggle_sel_bezt_free_align_handles(ListBaseT< Nurb > *nurbs)
wmKeyMap * WM_modalkeymap_find(wmKeyConfig *keyconf, const char *idname)
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
MINLINE void copy_v3_v3(float r[3], const float a[3])
static void move_bezt_by_displacement(BezTriple *bezt, const float disp_3d[3])
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
static bool get_closest_vertex_to_point_in_nurbs(const ViewContext *vc, const ListBaseT< Nurb > *nurbs, const float point[2], Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp, int *r_bezt_idx)
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
static void toggle_bezt_free_align_handles(BezTriple *bezt)
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
eV3DProjStatus ED_view3d_project_float_object(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
static void insert_bp_to_nurb(Nurb *nu, const CutData *data, Curve *cu)
MINLINE float mul_project_m4_v3_zfac(const float mat[4][4], const float co[3]) ATTR_WARN_UNUSED_RESULT
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
bool ED_operator_editcurve(bContext *C)
static bool insert_point_to_segment(const ViewContext *vc, const wmEvent *event)
static bool update_cut_data_for_all_nurbs(const ViewContext *vc, const ListBaseT< Nurb > *nurbs, const float point[2], const float sel_dist, CutData *cd)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
BezTriple * BKE_nurb_bezt_get_prev(Nurb *nu, BezTriple *bezt)
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
void ED_curve_beztcpy(EditNurb *editnurb, BezTriple *dst, BezTriple *src, int count)
wmKeyMap * curve_pen_modal_keymap(wmKeyConfig *keyconf)
@ PEN_MODAL_FREE_ALIGN_TOGGLE
@ PEN_MODAL_MOVE_ADJACENT
static wmOperatorStatus curve_pen_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static CutData init_cut_data(const wmEvent *event)
static void extrude_vertices_from_selected_endpoints(EditNurb *editnurb, ListBaseT< Nurb > *nurbs, Curve *cu, const float disp_3d[3])
static bool get_selected_center(const ListBaseT< Nurb > *nurbs, const bool mid_only, const bool bezt_only, float r_center[3])
static void move_all_selected_points(const ViewContext *vc, const wmEvent *event, CurvePenData *cpd, ListBaseT< Nurb > *nurbs, const bool bezt_only)
void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float r_out[3])
static void move_bezt_to_location(BezTriple *bezt, const float location[3])
void BKE_curve_nurb_vert_active_validate(Curve *cu)
MINLINE void mul_v3_fl(float r[3], float f)
static void delete_bp_from_nurb(const BPoint *bp, Nurb *nu, EditNurb *editnurb)
static bool make_cyclic_if_endpoints(const ViewContext *vc, Nurb *sel_nu, BezTriple *sel_bezt, BPoint *sel_bp)
static void delete_bezt_from_nurb(const BezTriple *bezt, Nurb *nu, EditNurb *editnurb)
void mul_m4_v3(const float M[4][4], float r[3])
static void update_cut_data_for_nurb(const ViewContext *vc, CutData *cd, Nurb *nu, const int resolu, const float point[2])
static void toggle_select_bezt(BezTriple *bezt, const int bezt_idx, Curve *cu, Nurb *nu)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
VecBase< int32_t, 2 > int2
static void move_bezt_handle_or_vertex_by_displacement(const ViewContext *vc, BezTriple *bezt, const int bezt_idx, const float disp_2d[2], const float distance, const bool link_handles, const bool lock_angle)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
bool WM_event_drag_test(const wmEvent *event, const int prev_xy[2])
static void get_updated_data_for_edge(const float point[2], const float point1[2], const float point2[2], const int point_idx, const int resolu_idx, float *r_min_dist, int *r_min_i, float *r_param)
void BKE_nurb_handles_calc(Nurb *nu)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
static void screenspace_to_worldspace(const ViewContext *vc, const float pos_2d[2], const float depth[3], float r_pos_3d[3])
void DEG_id_tag_update(ID *id, unsigned int flags)
BMesh const char void * data
void BKE_curve_editNurb_keyIndex_delCV(CVKeyIndexMap *keyindex, const void *cv)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
Object * CTX_data_edit_object(const bContext *C)
void WM_operator_properties_mouse_select(wmOperatorType *ot)
void CURVE_OT_pen(wmOperatorType *ot)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
BezTriple * BKE_nurb_bezt_get_next(Nurb *nu, BezTriple *bezt)
float cos_v2v2v2(const float p1[2], const float p2[2], const float p3[2]) ATTR_WARN_UNUSED_RESULT
static void delete_nurb(Curve *cu, Nurb *nu)
static const EnumPropertyItem prop_close_spline_method[]
bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], const int dist_px, const SelectPick_Params ¶ms)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
ListBaseT< Nurb > * object_editcurve_get(Object *ob)
MINLINE void zero_v3(float r[3])
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
static void get_bezier_interpolated_point(const BezTriple *bezt1, const BezTriple *bezt2, const float parameter, float r_point[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
static int get_nurb_index(const ListBaseT< Nurb > *nurbs, const Nurb *nurb)
static void toggle_handle_types(BezTriple *bezt, int bezt_idx, CurvePenData *cpd)
static void move_bp_to_location(const ViewContext *vc, BPoint *bp, const float mval[2])
static void init_selected_bezt_handles(ListBaseT< Nurb > *nurbs)
MINLINE void add_v3_v3(float r[3], const float a[3])
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
static void insert_bezt_to_nurb(Nurb *nu, const CutData *data, Curve *cu)
static void screenspace_to_worldspace_int(const ViewContext *vc, const int pos_2d[2], const float depth[3], float r_pos_3d[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
static bool is_last_bezt(const Nurb *nu, const BezTriple *bezt)
int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3])
static void move_segment(const ViewContext *vc, MoveSegmentData *seg_data, const wmEvent *event)
static void extrude_points_from_selected_vertices(const ViewContext *vc, const wmEvent *event, const eBezTriple_Handle extrude_handle)
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], float t)
MINLINE float max_ff(float a, float b)
MINLINE float len_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
static void update_location_for_2d_curve(const ViewContext *vc, float location[3])
MINLINE float normalize_v3_length(float n[3], float unit_length)
static void toggle_select_bp(BPoint *bp, Curve *cu, Nurb *nu)
static bool is_cyclic(const Nurb *nu)
float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
MINLINE float interpf(float target, float origin, float t)
void ED_view3d_win_to_3d_int(const View3D *v3d, const ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3])
ListBaseT< Nurb > * BKE_curve_editNurbs_get(Curve *cu)
static void move_adjacent_handle(const ViewContext *vc, const wmEvent *event, ListBaseT< Nurb > *nurbs)
static void deselect_all_center_vertices(ListBaseT< Nurb > *nurbs)
wmKeyMap * WM_modalkeymap_ensure(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)
static wmOperatorStatus curve_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
MINLINE float len_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
bool ED_curve_deselect_all(EditNurb *editnurb)
static bool is_spline_nearby(ViewContext *vc, wmOperator *op, const wmEvent *event, const float sel_dist)
static void cycle_handles(BezTriple *bezt)
void BKE_nurb_knot_calc_u(Nurb *nu)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
float ED_view3d_select_dist_px()
void ED_view3d_win_to_3d(const View3D *v3d, const ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3])
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
static bool worldspace_to_screenspace(const ViewContext *vc, const float pos_3d[3], float r_pos_2d[2])
static void remove_handle_movement_constraints(BezTriple *bezt, const bool f1, const bool f3)
static const EnumPropertyItem prop_handle_types[]
void ed_dissolve_bez_segment(BezTriple *bezt_prev, BezTriple *bezt_next, const Nurb *nu, const Curve *cu, const uint span_len, const uint span_step[2])
bool curve_toggle_cyclic(View3D *v3d, ListBaseT< Nurb > *editnurb, int direction)
void BKE_nurb_free(Nurb *nu)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eHandleDisplay handle_display
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
#define ISMOUSE_MOTION(event_type)