Blender  V2.93
curve_intern.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 /* internal exports only */
27 struct EditNurb;
28 struct GHash;
29 struct ListBase;
30 struct Object;
31 struct ViewContext;
32 struct wmOperatorType;
33 
34 /* editfont.c */
35 enum {
43 };
45 enum {
55  NEXT_PAGE
56 };
57 
58 typedef enum eVisible_Types {
59  HIDDEN = true,
60  VISIBLE = false,
62 
63 typedef enum eEndPoint_Types {
64  FIRST = true,
65  LAST = false,
67 
68 typedef enum eCurveElem_Types {
72 
73 /* internal select utils */
74 bool select_beztriple(BezTriple *bezt, bool selstatus, uint8_t flag, eVisible_Types hidden);
75 bool select_bpoint(BPoint *bp, bool selstatus, uint8_t flag, bool hidden);
76 
79 
81 void FONT_OT_case_set(struct wmOperatorType *ot);
83 void FONT_OT_style_set(struct wmOperatorType *ot);
84 
86 
87 void FONT_OT_text_copy(struct wmOperatorType *ot);
88 void FONT_OT_text_cut(struct wmOperatorType *ot);
91 
92 void FONT_OT_move(struct wmOperatorType *ot);
94 void FONT_OT_delete(struct wmOperatorType *ot);
95 
98 
99 void FONT_OT_open(struct wmOperatorType *ot);
100 void FONT_OT_unlink(struct wmOperatorType *ot);
101 
104 
105 /* editcurve.c */
106 void CURVE_OT_hide(struct wmOperatorType *ot);
107 void CURVE_OT_reveal(struct wmOperatorType *ot);
108 
109 void CURVE_OT_separate(struct wmOperatorType *ot);
110 void CURVE_OT_split(struct wmOperatorType *ot);
111 void CURVE_OT_duplicate(struct wmOperatorType *ot);
112 void CURVE_OT_delete(struct wmOperatorType *ot);
114 
120 void CURVE_OT_decimate(struct wmOperatorType *ot);
124 
125 void CURVE_OT_smooth(struct wmOperatorType *ot);
129 
131 void CURVE_OT_subdivide(struct wmOperatorType *ot);
133 void CURVE_OT_spin(struct wmOperatorType *ot);
135 void CURVE_OT_extrude(struct wmOperatorType *ot);
137 
139 
140 /* exported for editcurve_undo.c */
141 struct GHash *ED_curve_keyindex_hash_duplicate(struct GHash *keyindex);
142 void ED_curve_keyindex_update_nurb(struct EditNurb *editnurb, struct Nurb *nu, struct Nurb *newnu);
143 
144 /* helper functions */
145 void ed_editnurb_translate_flag(struct ListBase *editnurb,
146  uint8_t flag,
147  const float vec[3],
148  bool is_2d);
149 bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, const uint8_t flag);
150 bool ed_editnurb_spin(float viewmat[4][4],
151  struct View3D *v3d,
152  struct Object *obedit,
153  const float axis[3],
154  const float cent[3]);
155 
156 /* editcurve_select.c */
171 
172 /* editcurve_add.c */
178 
185 
186 /* editcurve_query.c */
187 bool ED_curve_pick_vert(struct ViewContext *vc,
188  short sel,
189  struct Nurb **r_nurb,
190  struct BezTriple **r_bezt,
191  struct BPoint **r_bp,
192  short *r_handle,
193  struct Base **r_base);
195  Curve *cu, View3D *v3d, Nurb **r_nu, BezTriple **r_bezt, BPoint **r_bp);
196 
197 /* editcurve_paint.c */
198 void CURVE_OT_draw(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:1412
bool select_beztriple(BezTriple *bezt, bool selstatus, uint8_t flag, eVisible_Types hidden)
void CURVE_OT_shade_flat(struct wmOperatorType *ot)
Definition: editcurve.c:6799
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:810
void CURVE_OT_extrude(struct wmOperatorType *ot)
Definition: editcurve.c:5710
void CURVE_OT_primitive_nurbs_circle_add(struct wmOperatorType *ot)
void CURVE_OT_dissolve_verts(struct wmOperatorType *ot)
Definition: editcurve.c:6626
void CURVE_OT_radius_set(struct wmOperatorType *ot)
Definition: editcurve.c:2720
void CURVE_OT_split(struct wmOperatorType *ot)
Definition: editcurve.c:1545
void FONT_OT_textbox_remove(struct wmOperatorType *ot)
Definition: editfont.c:1851
struct GHash * ED_curve_keyindex_hash_duplicate(struct GHash *keyindex)
Definition: editcurve.c:536
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:1756
void CURVE_OT_select_random(struct wmOperatorType *ot)
void FONT_OT_line_break(struct wmOperatorType *ot)
Definition: editfont.c:1459
void CURVE_OT_normals_make_consistent(struct wmOperatorType *ot)
Definition: editcurve.c:4044
void CURVE_OT_cyclic_toggle(struct wmOperatorType *ot)
Definition: editcurve.c:5866
void CURVE_OT_hide(struct wmOperatorType *ot)
Definition: editcurve.c:3293
void FONT_OT_case_toggle(struct wmOperatorType *ot)
Definition: editfont.c:2045
void FONT_OT_text_cut(struct wmOperatorType *ot)
Definition: editfont.c:988
void CURVE_OT_make_segment(struct wmOperatorType *ot)
Definition: editcurve.c:4748
void CURVE_OT_select_more(struct wmOperatorType *ot)
@ DEL_SELECTION
Definition: curve_intern.h:40
@ DEL_PREV_WORD
Definition: curve_intern.h:39
@ DEL_PREV_SEL
Definition: curve_intern.h:42
@ DEL_PREV_CHAR
Definition: curve_intern.h:37
@ DEL_NEXT_WORD
Definition: curve_intern.h:38
@ DEL_NEXT_CHAR
Definition: curve_intern.h:36
@ DEL_NEXT_SEL
Definition: curve_intern.h:41
void CURVE_OT_primitive_nurbs_curve_add(struct wmOperatorType *ot)
@ NEXT_LINE
Definition: curve_intern.h:53
@ NEXT_CHAR
Definition: curve_intern.h:49
@ LINE_BEGIN
Definition: curve_intern.h:46
@ PREV_WORD
Definition: curve_intern.h:50
@ PREV_LINE
Definition: curve_intern.h:52
@ PREV_CHAR
Definition: curve_intern.h:48
@ LINE_END
Definition: curve_intern.h:47
@ PREV_PAGE
Definition: curve_intern.h:54
@ NEXT_PAGE
Definition: curve_intern.h:55
@ NEXT_WORD
Definition: curve_intern.h:51
void FONT_OT_case_set(struct wmOperatorType *ot)
Definition: editfont.c:2000
void CURVE_OT_de_select_first(struct wmOperatorType *ot)
void CURVE_OT_tilt_clear(struct wmOperatorType *ot)
Definition: editcurve.c:6995
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:3826
void CURVE_OT_select_all(struct wmOperatorType *ot)
void CURVE_OT_switch_direction(struct wmOperatorType *ot)
Definition: editcurve.c:2592
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:5626
void CURVE_OT_de_select_last(struct wmOperatorType *ot)
void FONT_OT_text_paste_from_file(struct wmOperatorType *ot)
Definition: editfont.c:608
eEndPoint_Types
Definition: curve_intern.h:63
@ FIRST
Definition: curve_intern.h:64
@ LAST
Definition: curve_intern.h:65
eCurveElem_Types
Definition: curve_intern.h:68
@ CURVE_VERTEX
Definition: curve_intern.h:69
@ CURVE_SEGMENT
Definition: curve_intern.h:70
void CURVE_OT_smooth_radius(struct wmOperatorType *ot)
Definition: editcurve.c:3151
void FONT_OT_move(struct wmOperatorType *ot)
Definition: editfont.c:1258
void FONT_OT_text_paste(struct wmOperatorType *ot)
Definition: editfont.c:1091
void FONT_OT_delete(struct wmOperatorType *ot)
Definition: editfont.c:1604
void CURVE_OT_match_texture_space(struct wmOperatorType *ot)
Definition: editcurve.c:7082
void FONT_OT_move_select(struct wmOperatorType *ot)
Definition: editfont.c:1289
void CURVE_OT_spline_type_set(struct wmOperatorType *ot)
Definition: editcurve.c:3915
void CURVE_OT_separate(struct wmOperatorType *ot)
Definition: editcurve.c:1472
void CURVE_OT_smooth_tilt(struct wmOperatorType *ot)
Definition: editcurve.c:3194
bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, const uint8_t flag)
Definition: editcurve.c:2005
void ED_curve_keyindex_update_nurb(struct EditNurb *editnurb, struct Nurb *nu, struct Nurb *newnu)
Definition: editcurve.c:347
void CURVE_OT_spin(struct wmOperatorType *ot)
Definition: editcurve.c:5077
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:4931
void FONT_OT_style_toggle(struct wmOperatorType *ot)
Definition: editfont.c:854
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:3108
void FONT_OT_unlink(struct wmOperatorType *ot)
Definition: editfont.c:2200
void CURVE_OT_shortest_path_pick(struct wmOperatorType *ot)
void CURVE_OT_select_less(struct wmOperatorType *ot)
void CURVE_OT_duplicate(struct wmOperatorType *ot)
Definition: editcurve.c:5941
void ed_editnurb_translate_flag(struct ListBase *editnurb, uint8_t flag, const float vec[3], bool is_2d)
Definition: editcurve.c:1708
eVisible_Types
Definition: curve_intern.h:58
@ HIDDEN
Definition: curve_intern.h:59
@ VISIBLE
Definition: curve_intern.h:60
void CURVE_OT_smooth(struct wmOperatorType *ot)
Definition: editcurve.c:2879
void CURVE_OT_decimate(struct wmOperatorType *ot)
Definition: editcurve.c:6721
@ CASE_LOWER
Definition: curve_intern.h:44
@ CASE_UPPER
Definition: curve_intern.h:44
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:953
void CURVE_OT_primitive_bezier_curve_add(struct wmOperatorType *ot)
void CURVE_OT_delete(struct wmOperatorType *ot)
Definition: editcurve.c:6479
void CURVE_OT_select_similar(struct wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_cylinder_add(struct wmOperatorType *ot)
void FONT_OT_textbox_add(struct wmOperatorType *ot)
Definition: editfont.c:1807
void CURVE_OT_spline_weight_set(struct wmOperatorType *ot)
Definition: editcurve.c:2654
void SURFACE_OT_primitive_nurbs_surface_surface_add(struct wmOperatorType *ot)
void CURVE_OT_reveal(struct wmOperatorType *ot)
Definition: editcurve.c:3373
void CURVE_OT_draw(struct wmOperatorType *ot)
void FONT_OT_change_spacing(struct wmOperatorType *ot)
Definition: editfont.c:1354
void CURVE_OT_select_linked_pick(struct wmOperatorType *ot)
void FONT_OT_open(struct wmOperatorType *ot)
Definition: editfont.c:2146
void CURVE_OT_shade_smooth(struct wmOperatorType *ot)
Definition: editcurve.c:6784
void CURVE_OT_handle_type_set(struct wmOperatorType *ot)
Definition: editcurve.c:3981
void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot)
void FONT_OT_select_all(struct wmOperatorType *ot)
Definition: editfont.c:897
void CURVE_OT_primitive_bezier_circle_add(struct wmOperatorType *ot)
unsigned char uint8_t
Definition: stdint.h:81
uint flag
Definition: BLI_ghash.c:114
wmOperatorType * ot
Definition: wm_files.c:3156