Blender  V3.3
curve_intern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 /* internal exports only */
11 struct EditNurb;
12 struct GHash;
13 struct ListBase;
14 struct Object;
15 struct ViewContext;
16 struct wmOperatorType;
17 
18 /* editfont.c */
19 
20 enum {
28 };
30 enum {
40  NEXT_PAGE
41 };
42 
43 typedef enum eVisible_Types {
44  HIDDEN = true,
45  VISIBLE = false,
47 
48 typedef enum eEndPoint_Types {
49  FIRST = true,
50  LAST = false,
52 
53 typedef enum eCurveElem_Types {
57 
58 /* internal select utils */
62 bool select_beztriple(BezTriple *bezt, bool selstatus, uint8_t flag, eVisible_Types hidden);
66 bool select_bpoint(BPoint *bp, bool selstatus, uint8_t flag, bool hidden);
67 
70 
72 void FONT_OT_case_set(struct wmOperatorType *ot);
74 void FONT_OT_style_set(struct wmOperatorType *ot);
75 
77 
78 void FONT_OT_text_copy(struct wmOperatorType *ot);
79 void FONT_OT_text_cut(struct wmOperatorType *ot);
82 
83 void FONT_OT_move(struct wmOperatorType *ot);
85 void FONT_OT_delete(struct wmOperatorType *ot);
86 
89 
90 void FONT_OT_open(struct wmOperatorType *ot);
91 void FONT_OT_unlink(struct wmOperatorType *ot);
92 
95 
96 /* editcurve.c */
97 
98 void CURVE_OT_hide(struct wmOperatorType *ot);
99 void CURVE_OT_reveal(struct wmOperatorType *ot);
100 
101 void CURVE_OT_separate(struct wmOperatorType *ot);
102 void CURVE_OT_split(struct wmOperatorType *ot);
103 void CURVE_OT_duplicate(struct wmOperatorType *ot);
104 void CURVE_OT_delete(struct wmOperatorType *ot);
106 
112 void CURVE_OT_decimate(struct wmOperatorType *ot);
116 
117 void CURVE_OT_smooth(struct wmOperatorType *ot);
121 
123 void CURVE_OT_subdivide(struct wmOperatorType *ot);
125 void CURVE_OT_spin(struct wmOperatorType *ot);
127 void CURVE_OT_extrude(struct wmOperatorType *ot);
129 
131 
132 /* exported for editcurve_undo.c */
133 
134 struct GHash *ED_curve_keyindex_hash_duplicate(struct GHash *keyindex);
135 void ED_curve_keyindex_update_nurb(struct EditNurb *editnurb, struct Nurb *nu, struct Nurb *newnu);
136 
137 /* exported for editcurve_pen.c */
138 
139 int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3]);
140 bool curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction);
141 void ed_dissolve_bez_segment(BezTriple *bezt_prev,
142  BezTriple *bezt_next,
143  const Nurb *nu,
144  const Curve *cu,
145  const uint span_len,
146  const uint span_step[2]);
147 
148 /* helper functions */
149 void ed_editnurb_translate_flag(struct ListBase *editnurb,
150  uint8_t flag,
151  const float vec[3],
152  bool is_2d);
156 bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, uint8_t flag);
161 bool ed_editnurb_spin(float viewmat[4][4],
162  struct View3D *v3d,
163  struct Object *obedit,
164  const float axis[3],
165  const float cent[3]);
166 
167 /* editcurve_select.c */
168 
183 
184 /* editcurve_add.c */
185 
191 
198 
199 /* editcurve_query.c */
200 
201 bool ED_curve_pick_vert(struct ViewContext *vc,
202  short sel,
203  struct Nurb **r_nurb,
204  struct BezTriple **r_bezt,
205  struct BPoint **r_bp,
206  short *r_handle,
207  struct Base **r_base);
211 bool ED_curve_pick_vert_ex(struct ViewContext *vc,
212  short sel,
213  int dist_px,
214  struct Nurb **r_nurb,
215  struct BezTriple **r_bezt,
216  struct BPoint **r_bp,
217  short *r_handle,
218  struct Base **r_base);
220  Curve *cu, View3D *v3d, Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp);
221 
222 /* editcurve_paint.c */
223 
224 void CURVE_OT_draw(struct wmOperatorType *ot);
225 
226 /* editcurve_pen.c */
227 
228 void CURVE_OT_pen(struct wmOperatorType *ot);
229 struct wmKeyMap *curve_pen_modal_keymap(struct wmKeyConfig *keyconf);
unsigned int uint
Definition: BLI_sys_types.h:67
void CURVE_OT_pen(struct wmOperatorType *ot)
bool select_bpoint(BPoint *bp, bool selstatus, uint8_t flag, bool hidden)
void FONT_OT_change_character(struct wmOperatorType *ot)
Definition: editfont.c:1384
bool select_beztriple(BezTriple *bezt, bool selstatus, uint8_t flag, eVisible_Types hidden)
void CURVE_OT_shade_flat(struct wmOperatorType *ot)
Definition: editcurve.c:6842
void CURVE_OT_select_nth(struct wmOperatorType *ot)
void CURVE_OT_select_row(struct wmOperatorType *ot)
void FONT_OT_style_set(struct wmOperatorType *ot)
Definition: editfont.c:782
void CURVE_OT_extrude(struct wmOperatorType *ot)
Definition: editcurve.c:5739
void CURVE_OT_primitive_nurbs_circle_add(struct wmOperatorType *ot)
void CURVE_OT_dissolve_verts(struct wmOperatorType *ot)
Definition: editcurve.c:6669
void CURVE_OT_radius_set(struct wmOperatorType *ot)
Definition: editcurve.c:2694
void CURVE_OT_split(struct wmOperatorType *ot)
Definition: editcurve.c:1523
void FONT_OT_textbox_remove(struct wmOperatorType *ot)
Definition: editfont.c:1814
struct GHash * ED_curve_keyindex_hash_duplicate(struct GHash *keyindex)
Definition: editcurve.c:521
bool ED_curve_pick_vert(struct ViewContext *vc, short sel, struct Nurb **r_nurb, struct BezTriple **r_bezt, struct BPoint **r_bp, short *r_handle, struct Base **r_base)
void FONT_OT_text_insert(struct wmOperatorType *ot)
Definition: editfont.c:1719
void CURVE_OT_select_random(struct wmOperatorType *ot)
void FONT_OT_line_break(struct wmOperatorType *ot)
Definition: editfont.c:1431
void CURVE_OT_normals_make_consistent(struct wmOperatorType *ot)
Definition: editcurve.c:4011
void CURVE_OT_cyclic_toggle(struct wmOperatorType *ot)
Definition: editcurve.c:5895
void CURVE_OT_hide(struct wmOperatorType *ot)
Definition: editcurve.c:3267
void FONT_OT_case_toggle(struct wmOperatorType *ot)
Definition: editfont.c:2008
void FONT_OT_text_cut(struct wmOperatorType *ot)
Definition: editfont.c:960
void CURVE_OT_make_segment(struct wmOperatorType *ot)
Definition: editcurve.c:4708
void CURVE_OT_select_more(struct wmOperatorType *ot)
void CURVE_OT_primitive_nurbs_curve_add(struct wmOperatorType *ot)
void FONT_OT_case_set(struct wmOperatorType *ot)
Definition: editfont.c:1963
void CURVE_OT_de_select_first(struct wmOperatorType *ot)
void CURVE_OT_tilt_clear(struct wmOperatorType *ot)
Definition: editcurve.c:7034
void CURVE_OT_select_linked(struct wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_curve_add(struct wmOperatorType *ot)
void CURVE_OT_subdivide(struct wmOperatorType *ot)
Definition: editcurve.c:3800
void CURVE_OT_select_all(struct wmOperatorType *ot)
void CURVE_OT_switch_direction(struct wmOperatorType *ot)
Definition: editcurve.c:2566
@ NEXT_LINE
Definition: curve_intern.h:38
@ NEXT_CHAR
Definition: curve_intern.h:34
@ LINE_BEGIN
Definition: curve_intern.h:31
@ PREV_WORD
Definition: curve_intern.h:35
@ PREV_LINE
Definition: curve_intern.h:37
@ PREV_CHAR
Definition: curve_intern.h:33
@ LINE_END
Definition: curve_intern.h:32
@ PREV_PAGE
Definition: curve_intern.h:39
@ NEXT_PAGE
Definition: curve_intern.h:40
@ NEXT_WORD
Definition: curve_intern.h:36
void ED_curve_nurb_vert_selected_find(Curve *cu, View3D *v3d, Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp)
void CURVE_OT_select_previous(struct wmOperatorType *ot)
void CURVE_OT_vertex_add(struct wmOperatorType *ot)
Definition: editcurve.c:5655
void CURVE_OT_de_select_last(struct wmOperatorType *ot)
void FONT_OT_text_paste_from_file(struct wmOperatorType *ot)
Definition: editfont.c:580
@ CASE_LOWER
Definition: curve_intern.h:29
@ CASE_UPPER
Definition: curve_intern.h:29
@ DEL_SELECTION
Definition: curve_intern.h:25
@ DEL_PREV_WORD
Definition: curve_intern.h:24
@ DEL_PREV_SEL
Definition: curve_intern.h:27
@ DEL_PREV_CHAR
Definition: curve_intern.h:22
@ DEL_NEXT_WORD
Definition: curve_intern.h:23
@ DEL_NEXT_CHAR
Definition: curve_intern.h:21
@ DEL_NEXT_SEL
Definition: curve_intern.h:26
eEndPoint_Types
Definition: curve_intern.h:48
@ FIRST
Definition: curve_intern.h:49
@ LAST
Definition: curve_intern.h:50
eCurveElem_Types
Definition: curve_intern.h:53
@ CURVE_VERTEX
Definition: curve_intern.h:54
@ CURVE_SEGMENT
Definition: curve_intern.h:55
bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, uint8_t flag)
Definition: editcurve.c:1979
void CURVE_OT_smooth_radius(struct wmOperatorType *ot)
Definition: editcurve.c:3125
void FONT_OT_move(struct wmOperatorType *ot)
Definition: editfont.c:1230
void FONT_OT_text_paste(struct wmOperatorType *ot)
Definition: editfont.c:1063
void FONT_OT_delete(struct wmOperatorType *ot)
Definition: editfont.c:1577
void CURVE_OT_match_texture_space(struct wmOperatorType *ot)
Definition: editcurve.c:7121
void FONT_OT_move_select(struct wmOperatorType *ot)
Definition: editfont.c:1261
void CURVE_OT_spline_type_set(struct wmOperatorType *ot)
Definition: editcurve.c:3884
void CURVE_OT_separate(struct wmOperatorType *ot)
Definition: editcurve.c:1447
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])
Definition: editcurve.c:6550
void CURVE_OT_smooth_tilt(struct wmOperatorType *ot)
Definition: editcurve.c:3168
void ED_curve_keyindex_update_nurb(struct EditNurb *editnurb, struct Nurb *nu, struct Nurb *newnu)
Definition: editcurve.c:332
void CURVE_OT_spin(struct wmOperatorType *ot)
Definition: editcurve.c:5100
bool ed_editnurb_spin(float viewmat[4][4], struct View3D *v3d, struct Object *obedit, const float axis[3], const float cent[3])
Definition: editcurve.c:4947
void FONT_OT_style_toggle(struct wmOperatorType *ot)
Definition: editfont.c:826
void SURFACE_OT_primitive_nurbs_surface_circle_add(struct wmOperatorType *ot)
void CURVE_OT_select_next(struct wmOperatorType *ot)
void CURVE_OT_smooth_weight(struct wmOperatorType *ot)
Definition: editcurve.c:3082
void FONT_OT_unlink(struct wmOperatorType *ot)
Definition: editfont.c:2163
void CURVE_OT_shortest_path_pick(struct wmOperatorType *ot)
struct wmKeyMap * curve_pen_modal_keymap(struct wmKeyConfig *keyconf)
bool curve_toggle_cyclic(View3D *v3d, ListBase *editnurb, int direction)
Definition: editcurve.c:5763
void CURVE_OT_select_less(struct wmOperatorType *ot)
void CURVE_OT_duplicate(struct wmOperatorType *ot)
Definition: editcurve.c:5974
void ed_editnurb_translate_flag(struct ListBase *editnurb, uint8_t flag, const float vec[3], bool is_2d)
Definition: editcurve.c:1686
eVisible_Types
Definition: curve_intern.h:43
@ HIDDEN
Definition: curve_intern.h:44
@ VISIBLE
Definition: curve_intern.h:45
void CURVE_OT_smooth(struct wmOperatorType *ot)
Definition: editcurve.c:2853
void CURVE_OT_decimate(struct wmOperatorType *ot)
Definition: editcurve.c:6764
bool ED_curve_pick_vert_ex(struct ViewContext *vc, short sel, int dist_px, struct Nurb **r_nurb, struct BezTriple **r_bezt, struct BPoint **r_bp, short *r_handle, struct Base **r_base)
void SURFACE_OT_primitive_nurbs_surface_sphere_add(struct wmOperatorType *ot)
void CURVE_OT_primitive_nurbs_path_add(struct wmOperatorType *ot)
void FONT_OT_text_copy(struct wmOperatorType *ot)
Definition: editfont.c:925
void CURVE_OT_primitive_bezier_curve_add(struct wmOperatorType *ot)
void CURVE_OT_delete(struct wmOperatorType *ot)
Definition: editcurve.c:6512
void CURVE_OT_select_similar(struct wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_cylinder_add(struct wmOperatorType *ot)
int ed_editcurve_addvert(Curve *cu, EditNurb *editnurb, View3D *v3d, const float location_init[3])
Definition: editcurve.c:5384
void FONT_OT_textbox_add(struct wmOperatorType *ot)
Definition: editfont.c:1770
void CURVE_OT_spline_weight_set(struct wmOperatorType *ot)
Definition: editcurve.c:2628
void SURFACE_OT_primitive_nurbs_surface_surface_add(struct wmOperatorType *ot)
void CURVE_OT_reveal(struct wmOperatorType *ot)
Definition: editcurve.c:3347
void CURVE_OT_draw(struct wmOperatorType *ot)
void FONT_OT_change_spacing(struct wmOperatorType *ot)
Definition: editfont.c:1326
void CURVE_OT_select_linked_pick(struct wmOperatorType *ot)
void FONT_OT_open(struct wmOperatorType *ot)
Definition: editfont.c:2109
void CURVE_OT_shade_smooth(struct wmOperatorType *ot)
Definition: editcurve.c:6827
void CURVE_OT_handle_type_set(struct wmOperatorType *ot)
Definition: editcurve.c:3948
void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot)
void FONT_OT_select_all(struct wmOperatorType *ot)
Definition: editfont.c:869
void CURVE_OT_primitive_bezier_circle_add(struct wmOperatorType *ot)
unsigned char uint8_t
Definition: stdint.h:78
uint flag
Definition: BLI_ghash.c:98
wmOperatorType * ot
Definition: wm_files.c:3479