Blender  V3.3
curve_ops.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2009 Blender Foundation. All rights reserved. */
3 
8 #include <math.h>
9 #include <stdlib.h>
10 
11 #include "DNA_curve_types.h"
12 #include "DNA_scene_types.h"
13 
14 #include "RNA_access.h"
15 
16 #include "WM_api.h"
17 #include "WM_types.h"
18 
19 #include "ED_curve.h"
20 #include "ED_screen.h"
21 
22 #include "curve_intern.h"
23 
24 /************************* registration ****************************/
25 
27 {
30 
35 
37 
42 
46 
49 
52 
55 
58 
64 
74 
80 
87 
92 
107 
117 
119 }
120 
122 {
124  wmOperatorTypeMacro *otmacro;
125 
126  ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move",
127  "Add Duplicate",
128  "Duplicate curve and move",
130  WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
131  otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
132  RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
133  RNA_boolean_set(otmacro->ptr, "mirror", false);
134 
135  ot = WM_operatortype_append_macro("CURVE_OT_extrude_move",
136  "Extrude Curve and Move",
137  "Extrude curve and move result",
139  WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
140  otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
141  RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
142  RNA_boolean_set(otmacro->ptr, "mirror", false);
143 }
144 
146 {
147  /* only set in editmode font, by space_view3d listener */
148  wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Font", 0, 0);
149  keymap->poll = ED_operator_editfont;
150 
151  /* only set in editmode curve, by space_view3d listener */
152  keymap = WM_keymap_ensure(keyconf, "Curve", 0, 0);
154 
155  curve_pen_modal_keymap(keyconf);
156 }
bool ED_operator_editsurfcurve(struct bContext *C)
Definition: screen_ops.c:587
bool ED_operator_editfont(struct bContext *C)
Definition: screen_ops.c:635
@ OPTYPE_UNDO
Definition: WM_types.h:148
@ OPTYPE_REGISTER
Definition: WM_types.h:146
void CURVE_OT_pen(struct wmOperatorType *ot)
void FONT_OT_change_character(struct wmOperatorType *ot)
Definition: editfont.c:1384
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
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
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
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 CURVE_OT_smooth_tilt(struct wmOperatorType *ot)
Definition: editcurve.c:3168
void CURVE_OT_spin(struct wmOperatorType *ot)
Definition: editcurve.c:5100
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)
void CURVE_OT_select_less(struct wmOperatorType *ot)
void CURVE_OT_duplicate(struct wmOperatorType *ot)
Definition: editcurve.c:5974
void CURVE_OT_smooth(struct wmOperatorType *ot)
Definition: editcurve.c:2853
void CURVE_OT_decimate(struct wmOperatorType *ot)
Definition: editcurve.c:6764
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)
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)
void ED_keymap_curve(wmKeyConfig *keyconf)
Definition: curve_ops.c:145
void ED_operatortypes_curve(void)
Definition: curve_ops.c:26
void ED_operatormacros_curve(void)
Definition: curve_ops.c:121
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
Definition: rna_access.c:4874
bool(* poll)(struct bContext *)
wmOperatorType * ot
Definition: wm_files.c:3479
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition: wm_keymap.c:852
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))