Blender V5.3
curve_intern.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_sys_types.hh"
12
13#include "DNA_curve_types.h"
14#include "DNA_listBase.h"
15
16namespace blender {
17
18/* internal exports only */
19struct BPoint;
20struct Base;
21struct BezTriple;
22struct Curve;
23struct EditNurb;
24struct Nurb;
25struct Object;
26struct View3D;
27struct ViewContext;
28struct wmKeyConfig;
29struct wmKeyMap;
30struct wmOperatorType;
31
32/* `editfont.cc` */
33
34enum {
42};
44enum {
57};
58
60 HIDDEN = true,
61 VISIBLE = false,
62};
63
65 FIRST = true,
66 LAST = false,
67};
68
73
74/* internal select utils */
78bool select_beztriple(BezTriple *bezt,
79 bool selstatus,
80 eBezTriple_Flag flag,
81 eVisible_Types hidden);
85bool select_bpoint(BPoint *bp, bool selstatus, eBezTriple_Flag flag, bool hidden);
86
87void FONT_OT_text_insert(wmOperatorType *ot);
88void FONT_OT_line_break(wmOperatorType *ot);
89
90void FONT_OT_case_toggle(wmOperatorType *ot);
91void FONT_OT_case_set(wmOperatorType *ot);
92void FONT_OT_style_toggle(wmOperatorType *ot);
93void FONT_OT_style_set(wmOperatorType *ot);
94
95void FONT_OT_select_all(wmOperatorType *ot);
96
97void FONT_OT_text_copy(wmOperatorType *ot);
98void FONT_OT_text_cut(wmOperatorType *ot);
99void FONT_OT_text_paste(wmOperatorType *ot);
100void FONT_OT_text_paste_from_file(wmOperatorType *ot);
101void FONT_OT_text_insert_unicode(wmOperatorType *ot);
102
103void FONT_OT_selection_set(wmOperatorType *ot);
104void FONT_OT_select_word(wmOperatorType *ot);
105
106void FONT_OT_move(wmOperatorType *ot);
107void FONT_OT_move_select(wmOperatorType *ot);
108void FONT_OT_delete(wmOperatorType *ot);
109
110void FONT_OT_change_character(wmOperatorType *ot);
111void FONT_OT_change_spacing(wmOperatorType *ot);
112
113void FONT_OT_open(wmOperatorType *ot);
114void FONT_OT_unlink(wmOperatorType *ot);
115
116void FONT_OT_textbox_add(wmOperatorType *ot);
117void FONT_OT_textbox_remove(wmOperatorType *ot);
118
119/* `editcurve.cc` */
120
121void CURVE_OT_hide(wmOperatorType *ot);
122void CURVE_OT_reveal(wmOperatorType *ot);
123
124void CURVE_OT_separate(wmOperatorType *ot);
125void CURVE_OT_split(wmOperatorType *ot);
126void CURVE_OT_duplicate(wmOperatorType *ot);
127void CURVE_OT_delete(wmOperatorType *ot);
128void CURVE_OT_dissolve_verts(wmOperatorType *ot);
129
130void CURVE_OT_spline_type_set(wmOperatorType *ot);
131void CURVE_OT_radius_set(wmOperatorType *ot);
132void CURVE_OT_spline_weight_set(wmOperatorType *ot);
133void CURVE_OT_handle_type_set(wmOperatorType *ot);
134void CURVE_OT_normals_make_consistent(wmOperatorType *ot);
135void CURVE_OT_decimate(wmOperatorType *ot);
136void CURVE_OT_shade_smooth(wmOperatorType *ot);
137void CURVE_OT_shade_flat(wmOperatorType *ot);
138void CURVE_OT_tilt_clear(wmOperatorType *ot);
139
140void CURVE_OT_smooth(wmOperatorType *ot);
141void CURVE_OT_smooth_weight(wmOperatorType *ot);
142void CURVE_OT_smooth_radius(wmOperatorType *ot);
143void CURVE_OT_smooth_tilt(wmOperatorType *ot);
144
145void CURVE_OT_switch_direction(wmOperatorType *ot);
146void CURVE_OT_subdivide(wmOperatorType *ot);
147void CURVE_OT_make_segment(wmOperatorType *ot);
148void CURVE_OT_spin(wmOperatorType *ot);
149void CURVE_OT_vertex_add(wmOperatorType *ot);
150void CURVE_OT_extrude(wmOperatorType *ot);
151void CURVE_OT_cyclic_toggle(wmOperatorType *ot);
152
153void CURVE_OT_match_texture_space(wmOperatorType *ot);
154
155/* exported for editcurve_undo.cc */
156
158void ED_curve_keyindex_update_nurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu);
159
160/* exported for `editcurve_pen.cc` */
161
162int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3]);
163bool curve_toggle_cyclic(View3D *v3d, ListBaseT<Nurb> *editnurb, int direction);
164void ed_dissolve_bez_segment(BezTriple *bezt_prev,
165 BezTriple *bezt_next,
166 const Nurb *nu,
167 const Curve *cu,
168 const uint span_len,
169 const uint span_step[2]);
170
171/* helper functions */
172void ed_editnurb_translate_flag(ListBaseT<Nurb> *editnurb,
173 eBezTriple_Flag flag,
174 const float vec[3],
175 bool is_2d);
179bool ed_editnurb_extrude_flag(EditNurb *editnurb, eBezTriple_Flag flag);
185 float viewmat[4][4], View3D *v3d, Object *obedit, const float axis[3], const float cent[3]);
186
187/* `editcurve_select.cc` */
188
189void CURVE_OT_de_select_first(wmOperatorType *ot);
190void CURVE_OT_de_select_last(wmOperatorType *ot);
191void CURVE_OT_select_all(wmOperatorType *ot);
192void CURVE_OT_select_linked(wmOperatorType *ot);
193void CURVE_OT_select_linked_pick(wmOperatorType *ot);
194void CURVE_OT_select_row(wmOperatorType *ot);
195void CURVE_OT_select_next(wmOperatorType *ot);
196void CURVE_OT_select_previous(wmOperatorType *ot);
197void CURVE_OT_select_more(wmOperatorType *ot);
198void CURVE_OT_select_less(wmOperatorType *ot);
199void CURVE_OT_select_random(wmOperatorType *ot);
200void CURVE_OT_select_nth(wmOperatorType *ot);
201void CURVE_OT_select_similar(wmOperatorType *ot);
202void CURVE_OT_shortest_path_pick(wmOperatorType *ot);
203
204/* `editcurve_add.cc` */
205
206void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot);
207void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot);
208void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot);
209void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot);
210void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot);
211
212void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot);
213void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot);
216void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot);
217void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot);
218
219/* `editcurve_query.cc` */
220
221bool ED_curve_pick_vert(ViewContext *vc,
222 short sel,
223 Nurb **r_nurb,
224 BezTriple **r_bezt,
225 BPoint **r_bp,
226 short *r_handle,
227 Base **r_base);
234bool ED_curve_pick_vert_ex(ViewContext *vc,
235 bool select,
236 int dist_px,
237 Nurb **r_nurb,
238 BezTriple **r_bezt,
239 BPoint **r_bp,
240 short *r_handle,
241 Base **r_base);
243 Curve *cu, View3D *v3d, Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp);
244
245/* `editcurve_paint.cc` */
246
247void CURVE_OT_draw(wmOperatorType *ot);
248
249/* `editcurve_pen.cc` */
250
251void CURVE_OT_pen(wmOperatorType *ot);
252wmKeyMap *curve_pen_modal_keymap(wmKeyConfig *keyconf);
253
254} // namespace blender
These structs are the foundation for all linked lists in the library system.
#define select(A, B, C)
BMesh Iterators.
void CURVE_OT_select_random(wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot)
void CURVE_OT_select_next(wmOperatorType *ot)
void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
void FONT_OT_change_spacing(wmOperatorType *ot)
Definition editfont.cc:1594
void CURVE_OT_make_segment(wmOperatorType *ot)
void CURVE_OT_match_texture_space(wmOperatorType *ot)
void CURVE_OT_duplicate(wmOperatorType *ot)
void CURVE_OT_select_all(wmOperatorType *ot)
unsigned int uint
Definition BKE_text.h:55
void CURVE_OT_tilt_clear(wmOperatorType *ot)
void CURVE_OT_vertex_add(wmOperatorType *ot)
void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
void CURVE_OT_extrude(wmOperatorType *ot)
bool ed_editnurb_extrude_flag(EditNurb *editnurb, eBezTriple_Flag flag)
void ED_curve_nurb_vert_selected_find(Curve *cu, View3D *v3d, Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp)
void FONT_OT_select_word(wmOperatorType *ot)
Definition editfont.cc:2161
void FONT_OT_line_break(wmOperatorType *ot)
Definition editfont.cc:1699
void FONT_OT_delete(wmOperatorType *ot)
Definition editfont.cc:1851
void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
void ED_curve_keyindex_update_nurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu)
Definition editcurve.cc:367
void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot)
void CURVE_OT_smooth_weight(wmOperatorType *ot)
wmKeyMap * curve_pen_modal_keymap(wmKeyConfig *keyconf)
void CURVE_OT_spin(wmOperatorType *ot)
void FONT_OT_unlink(wmOperatorType *ot)
Definition editfont.cc:2593
void CURVE_OT_decimate(wmOperatorType *ot)
void CURVE_OT_delete(wmOperatorType *ot)
void FONT_OT_move(wmOperatorType *ot)
Definition editfont.cc:1499
void CURVE_OT_normals_make_consistent(wmOperatorType *ot)
void CURVE_OT_draw(wmOperatorType *ot)
void FONT_OT_text_cut(wmOperatorType *ot)
Definition editfont.cc:1179
void CURVE_OT_smooth_tilt(wmOperatorType *ot)
void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
void CURVE_OT_dissolve_verts(wmOperatorType *ot)
void CURVE_OT_subdivide(wmOperatorType *ot)
void FONT_OT_case_set(wmOperatorType *ot)
Definition editfont.cc:2380
void CURVE_OT_hide(wmOperatorType *ot)
void FONT_OT_text_copy(wmOperatorType *ot)
Definition editfont.cc:1143
void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
void CURVE_OT_spline_weight_set(wmOperatorType *ot)
void CURVE_OT_radius_set(wmOperatorType *ot)
void CURVE_OT_switch_direction(wmOperatorType *ot)
void ed_editnurb_translate_flag(ListBaseT< Nurb > *editnurb, eBezTriple_Flag flag, const float vec[3], bool is_2d)
void CURVE_OT_de_select_last(wmOperatorType *ot)
void CURVE_OT_pen(wmOperatorType *ot)
void FONT_OT_open(wmOperatorType *ot)
Definition editfont.cc:2540
void FONT_OT_textbox_remove(wmOperatorType *ot)
Definition editfont.cc:2244
CVKeyIndexMap * ED_curve_keyindex_hash_duplicate(CVKeyIndexMap *keyindex)
Definition editcurve.cc:556
void FONT_OT_text_paste(wmOperatorType *ot)
Definition editfont.cc:1285
void FONT_OT_textbox_add(wmOperatorType *ot)
Definition editfont.cc:2200
void FONT_OT_style_toggle(wmOperatorType *ot)
Definition editfont.cc:1043
void CURVE_OT_smooth_radius(wmOperatorType *ot)
void CURVE_OT_separate(wmOperatorType *ot)
void CURVE_OT_split(wmOperatorType *ot)
void CURVE_OT_shortest_path_pick(wmOperatorType *ot)
void FONT_OT_change_character(wmOperatorType *ot)
Definition editfont.cc:1652
void CURVE_OT_de_select_first(wmOperatorType *ot)
void CURVE_OT_shade_smooth(wmOperatorType *ot)
void CURVE_OT_select_more(wmOperatorType *ot)
void FONT_OT_case_toggle(wmOperatorType *ot)
Definition editfont.cc:2427
void FONT_OT_select_all(wmOperatorType *ot)
Definition editfont.cc:1087
int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3])
void CURVE_OT_reveal(wmOperatorType *ot)
void FONT_OT_style_set(wmOperatorType *ot)
Definition editfont.cc:1002
bool select_beztriple(BezTriple *bezt, bool selstatus, eBezTriple_Flag flag, eVisible_Types hidden)
void CURVE_OT_smooth(wmOperatorType *ot)
void CURVE_OT_select_similar(wmOperatorType *ot)
void FONT_OT_selection_set(wmOperatorType *ot)
Definition editfont.cc:2124
void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot)
bool ED_curve_pick_vert_ex(ViewContext *vc, bool select, int dist_px, Nurb **r_nurb, BezTriple **r_bezt, BPoint **r_bp, short *r_handle, Base **r_base)
void FONT_OT_move_select(wmOperatorType *ot)
Definition editfont.cc:1530
void CURVE_OT_select_linked_pick(wmOperatorType *ot)
void CURVE_OT_shade_flat(wmOperatorType *ot)
void FONT_OT_text_insert(wmOperatorType *ot)
Definition editfont.cc:2001
void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot)
bool select_bpoint(BPoint *bp, bool selstatus, eBezTriple_Flag flag, bool hidden)
void CURVE_OT_spline_type_set(wmOperatorType *ot)
void CURVE_OT_select_previous(wmOperatorType *ot)
bool ED_curve_pick_vert(ViewContext *vc, short sel, Nurb **r_nurb, BezTriple **r_bezt, BPoint **r_bp, short *r_handle, Base **r_base)
void CURVE_OT_handle_type_set(wmOperatorType *ot)
bool ed_editnurb_spin(float viewmat[4][4], View3D *v3d, Object *obedit, const float axis[3], const float cent[3])
void CURVE_OT_select_linked(wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot)
void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot)
void CURVE_OT_select_nth(wmOperatorType *ot)
void CURVE_OT_select_row(wmOperatorType *ot)
void FONT_OT_text_paste_from_file(wmOperatorType *ot)
Definition editfont.cc:639
void FONT_OT_text_insert_unicode(wmOperatorType *ot)
Definition editfont.cc:810
void CURVE_OT_select_less(wmOperatorType *ot)
Map< const void *, struct CVKeyIndex * > CVKeyIndexMap
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)