Blender V4.3
editcurve_pen.cc File Reference
#include "DNA_curve_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_vector.h"
#include "BKE_context.hh"
#include "BKE_curve.hh"
#include "DEG_depsgraph.hh"
#include "WM_api.hh"
#include "ED_curve.hh"
#include "ED_screen.hh"
#include "ED_select_utils.hh"
#include "ED_view3d.hh"
#include "curve_intern.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include <cfloat>

Go to the source code of this file.

Classes

struct  CutData
 
struct  MoveSegmentData
 
struct  CurvePenData
 

Macros

#define FOREACH_SELECTED_BEZT_BEGIN(bezt, nurbs)
 
#define FOREACH_SELECTED_BEZT_END
 
#define SEL_DIST_FACTOR   0.2f
 

Enumerations

enum  eClose_opt { OFF = 0 , ON_PRESS = 1 , ON_CLICK = 2 }
 
enum  {
  PEN_MODAL_FREE_ALIGN_TOGGLE = 1 , PEN_MODAL_MOVE_ADJACENT , PEN_MODAL_MOVE_ENTIRE , PEN_MODAL_LINK_HANDLES ,
  PEN_MODAL_LOCK_ANGLE
}
 

Functions

static void update_location_for_2d_curve (const ViewContext *vc, float location[3])
 
static void screenspace_to_worldspace (const ViewContext *vc, const float pos_2d[2], const float depth[3], float r_pos_3d[3])
 
static void screenspace_to_worldspace_int (const ViewContext *vc, const int pos_2d[2], const float depth[3], float r_pos_3d[3])
 
static bool worldspace_to_screenspace (const ViewContext *vc, const float pos_3d[3], float r_pos_2d[2])
 
static void move_bezt_by_displacement (BezTriple *bezt, const float disp_3d[3])
 
static void move_bezt_to_location (BezTriple *bezt, const float location[3])
 
static void remove_handle_movement_constraints (BezTriple *bezt, const bool f1, const bool f3)
 
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)
 
static void move_bp_to_location (const ViewContext *vc, BPoint *bp, const float mval[2])
 
static bool get_selected_center (const ListBase *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, ListBase *nurbs, const bool bezt_only)
 
static int get_nurb_index (const ListBase *nurbs, const Nurb *nurb)
 
static void delete_nurb (Curve *cu, Nurb *nu)
 
static void delete_bezt_from_nurb (const BezTriple *bezt, Nurb *nu, EditNurb *editnurb)
 
static void delete_bp_from_nurb (const BPoint *bp, Nurb *nu, EditNurb *editnurb)
 
static bool get_closest_vertex_to_point_in_nurbs (const ViewContext *vc, const ListBase *nurbs, const float point[2], Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp, int *r_bezt_idx)
 
static void get_bezier_interpolated_point (const BezTriple *bezt1, const BezTriple *bezt2, const float parameter, float r_point[3])
 
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)
 
static bool is_cyclic (const Nurb *nu)
 
static void insert_bezt_to_nurb (Nurb *nu, const CutData *data, Curve *cu)
 
static void insert_bp_to_nurb (Nurb *nu, const CutData *data, Curve *cu)
 
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)
 
static void update_cut_data_for_nurb (const ViewContext *vc, CutData *cd, Nurb *nu, const int resolu, const float point[2])
 
static bool update_cut_data_for_all_nurbs (const ViewContext *vc, const ListBase *nurbs, const float point[2], const float sel_dist, CutData *cd)
 
static CutData init_cut_data (const wmEvent *event)
 
static bool insert_point_to_segment (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)
 
static void extrude_vertices_from_selected_endpoints (EditNurb *editnurb, ListBase *nurbs, Curve *cu, const float disp_3d[3])
 
static void deselect_all_center_vertices (ListBase *nurbs)
 
static bool is_last_bezt (const Nurb *nu, const BezTriple *bezt)
 
static void extrude_points_from_selected_vertices (const ViewContext *vc, const wmEvent *event, const int extrude_handle)
 
static bool is_spline_nearby (ViewContext *vc, wmOperator *op, const wmEvent *event, const float sel_dist)
 
static void move_segment (const ViewContext *vc, MoveSegmentData *seg_data, const wmEvent *event)
 
static void toggle_bezt_free_align_handles (BezTriple *bezt)
 
static void toggle_sel_bezt_free_align_handles (ListBase *nurbs)
 
static bool delete_point_under_mouse (const ViewContext *vc, const wmEvent *event)
 
static void move_adjacent_handle (const ViewContext *vc, const wmEvent *event, ListBase *nurbs)
 
static bool make_cyclic_if_endpoints (const ViewContext *vc, Nurb *sel_nu, BezTriple *sel_bezt, BPoint *sel_bp)
 
static void init_selected_bezt_handles (ListBase *nurbs)
 
static void toggle_select_bezt (BezTriple *bezt, const int bezt_idx, Curve *cu, Nurb *nu)
 
static void toggle_select_bp (BPoint *bp, Curve *cu, Nurb *nu)
 
static void toggle_handle_types (BezTriple *bezt, int bezt_idx, CurvePenData *cpd)
 
static void cycle_handles (BezTriple *bezt)
 
wmKeyMapcurve_pen_modal_keymap (wmKeyConfig *keyconf)
 
static int curve_pen_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
static int curve_pen_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void CURVE_OT_pen (wmOperatorType *ot)
 

Variables

static const EnumPropertyItem prop_handle_types []
 
static const EnumPropertyItem prop_close_spline_method []
 

Macro Definition Documentation

◆ FOREACH_SELECTED_BEZT_BEGIN

#define FOREACH_SELECTED_BEZT_BEGIN ( bezt,
nurbs )
Value:
LISTBASE_FOREACH (Nurb *, nu, nurbs) { \
if (nu->type == CU_BEZIER) { \
for (int i = 0; i < nu->pntsu; i++) { \
BezTriple *bezt = nu->bezt + i; \
if (BEZT_ISSEL_ANY(bezt) && !bezt->hide) {
#define LISTBASE_FOREACH(type, var, list)
@ CU_BEZIER
#define BEZT_ISSEL_ANY(bezt)

Definition at line 38 of file editcurve_pen.cc.

Referenced by extrude_points_from_selected_vertices(), init_selected_bezt_handles(), move_adjacent_handle(), and toggle_sel_bezt_free_align_handles().

◆ FOREACH_SELECTED_BEZT_END

#define FOREACH_SELECTED_BEZT_END
Value:
} \
} \
} \
BKE_nurb_handles_calc(nu); \
} \
((void)0)

Definition at line 45 of file editcurve_pen.cc.

Referenced by extrude_points_from_selected_vertices(), init_selected_bezt_handles(), move_adjacent_handle(), and toggle_sel_bezt_free_align_handles().

◆ SEL_DIST_FACTOR

#define SEL_DIST_FACTOR   0.2f

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PEN_MODAL_FREE_ALIGN_TOGGLE 
PEN_MODAL_MOVE_ADJACENT 
PEN_MODAL_MOVE_ENTIRE 
PEN_MODAL_LINK_HANDLES 
PEN_MODAL_LOCK_ANGLE 

Definition at line 1504 of file editcurve_pen.cc.

◆ eClose_opt

enum eClose_opt
Enumerator
OFF 
ON_PRESS 
ON_CLICK 

Definition at line 130 of file editcurve_pen.cc.

Function Documentation

◆ calculate_new_bezier_point()

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 )
static

Calculate handle positions of added and adjacent control points such that shape is preserved.

Definition at line 576 of file editcurve_pen.cc.

References interp_v3_v3v3().

Referenced by insert_bezt_to_nurb().

◆ CURVE_OT_pen()

◆ curve_pen_invoke()

◆ curve_pen_modal()

static int curve_pen_modal ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

Definition at line 1557 of file editcurve_pen.cc.

References CurvePenData::bezt, Nurb::bezt, MoveSegmentData::bezt_index, BKE_nurb_bezt_get_next(), BKE_nurb_handles_calc(), CurvePenData::bp, CurvePenData::changed, copy_v2_v2_int(), CTX_data_edit_object(), CTX_data_ensure_evaluated_depsgraph(), CU_BEZIER, wmOperator::customdata, cycle_handles(), Object::data, DEG_id_tag_update(), delete_point_under_mouse(), depsgraph, CurvePenData::dragging, ED_curve_deselect_all(), ED_curve_editnurb_select_pick(), ED_view3d_select_dist_px(), ED_view3d_viewcontext_init(), Curve::editnurb, ELEM, EVT_MODAL_MAP, extrude_points_from_selected_vertices(), float, CurvePenData::found_point, get_closest_vertex_to_point_in_nurbs(), init_selected_bezt_handles(), insert_point_to_segment(), is_cyclic(), ISMOUSE_MOTION, KM_DBL_CLICK, KM_RELEASE, KM_SHIFT, LEFTMOUSE, CurvePenData::link_handles, CurvePenData::lock_angle, make_cyclic_if_endpoints(), MEM_callocN, MEM_freeN(), CurvePenData::move_adjacent, move_adjacent_handle(), move_all_selected_points(), CurvePenData::move_entire, move_segment(), CurvePenData::msd, ViewContext::mval, wmEvent::mval, NC_GEOM, ND_DATA, ND_SELECT, CurvePenData::new_point, CurvePenData::nu, MoveSegmentData::nu, EditNurb::nurbs, ViewContext::obedit, ON_CLICK, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, params, PEN_MODAL_FREE_ALIGN_TOGGLE, PEN_MODAL_LINK_HANDLES, PEN_MODAL_LOCK_ANGLE, PEN_MODAL_MOVE_ADJACENT, PEN_MODAL_MOVE_ENTIRE, wmEvent::prev_press_xy, wmOperator::ptr, ret, RNA_boolean_get(), RNA_enum_get(), SEL_DIST_FACTOR, SEL_OP_SET, CurvePenData::select_multi, CurvePenData::selection_made, CurvePenData::spline_nearby, toggle_bezt_free_align_handles(), toggle_handle_types(), toggle_sel_bezt_free_align_handles(), toggle_select_bezt(), toggle_select_bp(), Nurb::type, wmEvent::type, wmEvent::val, WM_event_add_notifier(), and WM_event_drag_test().

Referenced by CURVE_OT_pen().

◆ curve_pen_modal_keymap()

◆ cycle_handles()

static void cycle_handles ( BezTriple * bezt)
static

Definition at line 1488 of file editcurve_pen.cc.

References BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_FREE, and HD_VECT.

Referenced by curve_pen_modal().

◆ delete_bezt_from_nurb()

static void delete_bezt_from_nurb ( const BezTriple * bezt,
Nurb * nu,
EditNurb * editnurb )
static

◆ delete_bp_from_nurb()

static void delete_bp_from_nurb ( const BPoint * bp,
Nurb * nu,
EditNurb * editnurb )
static

◆ delete_nurb()

static void delete_nurb ( Curve * cu,
Nurb * nu )
static

◆ delete_point_under_mouse()

◆ deselect_all_center_vertices()

static void deselect_all_center_vertices ( ListBase * nurbs)
static

Deselect all vertices that are not endpoints.

Definition at line 1060 of file editcurve_pen.cc.

References BEZT_DESEL_ALL, CU_BEZIER, is_cyclic(), LISTBASE_FOREACH, and SELECT.

Referenced by extrude_points_from_selected_vertices().

◆ extrude_points_from_selected_vertices()

◆ extrude_vertices_from_selected_endpoints()

◆ get_bezier_interpolated_point()

static void get_bezier_interpolated_point ( const BezTriple * bezt1,
const BezTriple * bezt2,
const float parameter,
float r_point[3] )
static

Interpolate along the Bezier segment by a parameter (between 0 and 1) and get its location.

Definition at line 559 of file editcurve_pen.cc.

References interp_v3_v3v3(), and BezTriple::vec.

Referenced by insert_point_to_segment(), and move_segment().

◆ get_closest_vertex_to_point_in_nurbs()

static bool get_closest_vertex_to_point_in_nurbs ( const ViewContext * vc,
const ListBase * nurbs,
const float point[2],
Nurb ** r_nu,
BezTriple ** r_bezt,
BPoint ** r_bp,
int * r_bezt_idx )
static

◆ get_first_selected_point()

static void get_first_selected_point ( Curve * cu,
View3D * v3d,
Nurb ** r_nu,
BezTriple ** r_bezt,
BPoint ** r_bp )
static

Get the first selected point from the curve. If more than one selected point is found, define and return only the first detected nu.

Definition at line 887 of file editcurve_pen.cc.

References BEZT_ISSEL_ANY_HIDDENHANDLES, CU_BEZIER, Curve::editnurb, BPoint::f1, LISTBASE_FOREACH, EditNurb::nurbs, and SELECT.

Referenced by curve_pen_invoke().

◆ get_nurb_index()

static int get_nurb_index ( const ListBase * nurbs,
const Nurb * nurb )
static

Definition at line 430 of file editcurve_pen.cc.

References BLI_findindex().

Referenced by delete_nurb().

◆ get_selected_center()

static bool get_selected_center ( const ListBase * nurbs,
const bool mid_only,
const bool bezt_only,
float r_center[3] )
static

Get the average position of selected points.

Parameters
mid_onlyUse only the middle point of the three points on a BezTriple.
bezt_onlyUse only points of Bezier splines.

Definition at line 313 of file editcurve_pen.cc.

References add_v3_v3(), BEZT_ISSEL_ANY, BEZT_ISSEL_IDX, CU_BEZIER, BezTriple::hide, LISTBASE_FOREACH, mul_v3_fl(), SELECT, BezTriple::vec, and zero_v3().

Referenced by extrude_points_from_selected_vertices(), and move_all_selected_points().

◆ get_updated_data_for_edge()

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 )
static

Update r_min_dist, r_min_i, and r_param based on the edge and the external point.

Parameters
pointExternal point
point1One end of the edge
point2The other end of the edge
point_idxIndex of the control point out of the points on the Nurb
resolu_idxIndex of the edge on a Bezier segment (zero for non-Bezier edges)
r_min_distminimum distance from point to edge
r_min_iindex of closest point on Nurb
r_paramthe fraction along the edge at which the closest point lies

Definition at line 709 of file editcurve_pen.cc.

References angle_v2v2(), cos_v2v2v2(), dot_v2v2(), len_v2(), sinf, and sub_v2_v2v2().

Referenced by update_cut_data_for_nurb().

◆ init_cut_data()

static CutData init_cut_data ( const wmEvent * event)
static

Definition at line 833 of file editcurve_pen.cc.

References CutData::bezt_index, and FLT_MAX.

Referenced by insert_point_to_segment(), and is_spline_nearby().

◆ init_selected_bezt_handles()

static void init_selected_bezt_handles ( ListBase * nurbs)
static

◆ insert_bezt_to_nurb()

◆ insert_bp_to_nurb()

static void insert_bp_to_nurb ( Nurb * nu,
const CutData * data,
Curve * cu )
static

◆ insert_point_to_segment()

◆ is_cyclic()

static bool is_cyclic ( const Nurb * nu)
static

Definition at line 592 of file editcurve_pen.cc.

References CU_NURB_CYCLIC, and Nurb::flagu.

Referenced by bevel_list_calc_bisect(), blender::io::alembic::bezier_point_count(), blender::io::usd::bezier_point_count(), BKE_curve_bevelList_make(), BKE_curve_calc_coords_axis(), BKE_curve_calc_coords_axis_len(), BKE_curve_decimate_bezt_array(), BKE_gpencil_editcurve_subdivide(), BKE_gpencil_stroke_delete_tagged_points(), BKE_gpencil_stroke_smooth_point(), BKE_gpencil_stroke_smooth_strength(), BKE_gpencil_stroke_smooth_thickness(), BKE_gpencil_stroke_smooth_uv(), BKE_maskrasterize_handle_init(), BKE_where_on_path(), blender::ed::greasepencil::build_curves_2d_bvh_from_visible(), blender::calc_radius_limit(), calcknots(), blender::bke::curves::poly::calculate_tangents(), blender::ed::curves::create_Bezier(), blender::ed::curves::create_NURBS(), createTransGPencil_curves(), curve_pen_invoke(), curve_pen_modal(), curve_to_displist(), blender::ed::curves::curves_draw_exec(), deselect_all_center_vertices(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), blender::ed::curves::duplicate_points(), ed_editcurve_extrude(), fcurve_to_keylist(), blender::ed::greasepencil::find_curve_intersections(), blender::ed::greasepencil::find_curve_segments(), blender::find_envelope(), blender::geometry::gaussian_blur_1D(), blender::ed::greasepencil::generate_stroke_perimeter(), get_curve_points_from_idx(), blender::io::usd::get_curve_width_interpolation(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), gpencil_editcurve_subdivide_count(), blender::ed::sculpt_paint::grease_pencil_fill_extension_cut(), blender::draw::grease_pencil_geom_batch_ensure(), blender::ed::greasepencil::grease_pencil_primitive_init_curves(), blender::draw::grease_pencil_weight_batch_ensure(), blender::draw::grease_pencil_wire_batch_ensure(), blender::draw::index_buf_add_line_points(), insert_bezt_to_nurb(), insert_bp_to_nurb(), is_last_bezt(), knifeproject_poly_from_object(), make_bevel_list_3D_minimum_twist(), blender::io::usd::point_count(), blender::io::usd::populate_curve_props(), blender::io::usd::populate_curve_props_for_bezier(), blender::io::usd::populate_curve_props_for_nurbs(), blender::io::usd::populate_curve_verts(), blender::io::usd::populate_curve_verts_for_bezier(), position_tail_on_spline(), blender::io::usd::USDCurvesReader::read_curve_sample(), blender::ed::greasepencil::remove_points_and_split(), blender::ed::curves::select_mask_from_predicates(), set_up_beztriple_chain(), blender::ed::greasepencil::trim::trim_curve_segments(), update_cut_data_for_nurb(), and blender::write_stroke_transforms().

◆ is_last_bezt()

static bool is_last_bezt ( const Nurb * nu,
const BezTriple * bezt )
static

Definition at line 1085 of file editcurve_pen.cc.

References Nurb::bezt, is_cyclic(), and Nurb::pntsu.

Referenced by init_selected_bezt_handles().

◆ is_spline_nearby()

◆ make_cyclic_if_endpoints()

static bool make_cyclic_if_endpoints ( const ViewContext * vc,
Nurb * sel_nu,
BezTriple * sel_bezt,
BPoint * sel_bp )
static

Close the spline if endpoints are selected consecutively. Return true if cycle was created.

Definition at line 1385 of file editcurve_pen.cc.

References Nurb::bezt, Nurb::bp, CU_BEZIER, curve_toggle_cyclic(), Object::data, Curve::editnurb, ELEM, float, get_closest_vertex_to_point_in_nurbs(), ViewContext::mval, EditNurb::nurbs, ViewContext::obedit, object_editcurve_get(), Nurb::pntsu, Nurb::type, and ViewContext::v3d.

Referenced by curve_pen_invoke(), and curve_pen_modal().

◆ move_adjacent_handle()

◆ move_all_selected_points()

◆ move_bezt_by_displacement()

static void move_bezt_by_displacement ( BezTriple * bezt,
const float disp_3d[3] )
static

◆ move_bezt_handle_or_vertex_by_displacement()

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 )
static

◆ move_bezt_to_location()

static void move_bezt_to_location ( BezTriple * bezt,
const float location[3] )
static

Move entire control point to given worldspace location.

Definition at line 224 of file editcurve_pen.cc.

References move_bezt_by_displacement(), sub_v3_v3v3(), and BezTriple::vec.

Referenced by move_bezt_handle_or_vertex_by_displacement().

◆ move_bp_to_location()

static void move_bp_to_location ( const ViewContext * vc,
BPoint * bp,
const float mval[2] )
static

Definition at line 300 of file editcurve_pen.cc.

References copy_v3_v3(), screenspace_to_worldspace(), and BPoint::vec.

Referenced by move_all_selected_points().

◆ move_segment()

◆ remove_handle_movement_constraints()

static void remove_handle_movement_constraints ( BezTriple * bezt,
const bool f1,
const bool f3 )
static

Alter handle types to allow free movement (Set handles to #FREE or #ALIGN).

Definition at line 234 of file editcurve_pen.cc.

References BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_FREE, and HD_VECT.

Referenced by move_all_selected_points(), and move_segment().

◆ screenspace_to_worldspace()

static void screenspace_to_worldspace ( const ViewContext * vc,
const float pos_2d[2],
const float depth[3],
float r_pos_3d[3] )
static

◆ screenspace_to_worldspace_int()

static void screenspace_to_worldspace_int ( const ViewContext * vc,
const int pos_2d[2],
const float depth[3],
float r_pos_3d[3] )
static

Definition at line 196 of file editcurve_pen.cc.

References float, and screenspace_to_worldspace().

Referenced by move_all_selected_points(), and move_segment().

◆ toggle_bezt_free_align_handles()

static void toggle_bezt_free_align_handles ( BezTriple * bezt)
static

Toggle between HD_FREE and HD_ALIGN handles of the given BezTriple

Definition at line 1269 of file editcurve_pen.cc.

References BezTriple::h1, BezTriple::h2, HD_ALIGN, and HD_FREE.

Referenced by curve_pen_modal(), and toggle_sel_bezt_free_align_handles().

◆ toggle_handle_types()

static void toggle_handle_types ( BezTriple * bezt,
int bezt_idx,
CurvePenData * cpd )
static

Definition at line 1460 of file editcurve_pen.cc.

References CurvePenData::changed, BezTriple::h1, BezTriple::h2, HD_AUTO, HD_FREE, and HD_VECT.

Referenced by curve_pen_modal().

◆ toggle_sel_bezt_free_align_handles()

static void toggle_sel_bezt_free_align_handles ( ListBase * nurbs)
static

Toggle between HD_FREE and HD_ALIGN handles of the all selected BezTriple

Definition at line 1282 of file editcurve_pen.cc.

References FOREACH_SELECTED_BEZT_BEGIN, FOREACH_SELECTED_BEZT_END, and toggle_bezt_free_align_handles().

Referenced by curve_pen_modal().

◆ toggle_select_bezt()

static void toggle_select_bezt ( BezTriple * bezt,
const int bezt_idx,
Curve * cu,
Nurb * nu )
static

◆ toggle_select_bp()

static void toggle_select_bp ( BPoint * bp,
Curve * cu,
Nurb * nu )
static

Definition at line 1449 of file editcurve_pen.cc.

References BKE_curve_nurb_vert_active_set(), BPoint::f1, and SELECT.

Referenced by curve_pen_modal().

◆ update_cut_data_for_all_nurbs()

static bool update_cut_data_for_all_nurbs ( const ViewContext * vc,
const ListBase * nurbs,
const float point[2],
const float sel_dist,
CutData * cd )
static

◆ update_cut_data_for_nurb()

◆ update_location_for_2d_curve()

◆ worldspace_to_screenspace()

Variable Documentation

◆ prop_close_spline_method

const EnumPropertyItem prop_close_spline_method[]
static
Initial value:
= {
{OFF, "OFF", 0, "None", ""},
{ON_PRESS, "ON_PRESS", 0, "On Press", "Move handles after closing the spline"},
{ON_CLICK, "ON_CLICK", 0, "On Click", "Spline closes on release if not dragged"},
{0, nullptr, 0, nullptr, nullptr},
}
@ ON_PRESS
@ ON_CLICK
@ OFF

Definition at line 136 of file editcurve_pen.cc.

Referenced by CURVE_OT_pen().

◆ prop_handle_types

const EnumPropertyItem prop_handle_types[]
static
Initial value:
= {
{HD_AUTO, "AUTO", 0, "Auto", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ HD_VECT
@ HD_AUTO

Definition at line 124 of file editcurve_pen.cc.

Referenced by CURVE_OT_pen().