Blender V5.0
curve_ops.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstdlib>
10
11#include "RNA_access.hh"
12
13#include "WM_api.hh"
14#include "WM_types.hh"
15
16#include "ED_curve.hh"
17#include "ED_screen.hh"
18
19#include "curve_intern.hh"
20
21/************************* registration ****************************/
22
24{
27
32
34
40
43
47
50
53
56
59
65
75
81
88
93
108
118
120}
121
123{
125 wmOperatorTypeMacro *otmacro;
126
127 ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move",
128 "Add Duplicate",
129 "Duplicate curve and move",
131 WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
132 otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
133 RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
134 RNA_boolean_set(otmacro->ptr, "mirror", false);
135
136 ot = WM_operatortype_append_macro("CURVE_OT_extrude_move",
137 "Extrude Curve and Move",
138 "Extrude curve and move result",
140 WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
141 otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
142 RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
143 RNA_boolean_set(otmacro->ptr, "mirror", false);
144}
145
147{
148 /* only set in editmode font, by space_view3d listener */
149 wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Font", SPACE_EMPTY, RGN_TYPE_WINDOW);
150 keymap->poll = ED_operator_editfont;
151
152 /* only set in editmode curve, by space_view3d listener */
153 keymap = WM_keymap_ensure(keyconf, "Curve", SPACE_EMPTY, RGN_TYPE_WINDOW);
155
156 curve_pen_modal_keymap(keyconf);
157}
@ RGN_TYPE_WINDOW
@ SPACE_EMPTY
bool ED_operator_editsurfcurve(bContext *C)
bool ED_operator_editfont(bContext *C)
@ OPTYPE_UNDO
Definition WM_types.hh:182
@ OPTYPE_REGISTER
Definition WM_types.hh:180
void CURVE_OT_select_random(wmOperatorType *ot)
void FONT_OT_textbox_add(wmOperatorType *ot)
Definition editfont.cc:2169
void FONT_OT_style_toggle(wmOperatorType *ot)
Definition editfont.cc:1029
void CURVE_OT_select_less(wmOperatorType *ot)
void CURVE_OT_select_similar(wmOperatorType *ot)
void CURVE_OT_dissolve_verts(wmOperatorType *ot)
void FONT_OT_text_copy(wmOperatorType *ot)
Definition editfont.cc:1129
void CURVE_OT_select_previous(wmOperatorType *ot)
void CURVE_OT_match_texture_space(wmOperatorType *ot)
void CURVE_OT_switch_direction(wmOperatorType *ot)
void FONT_OT_line_break(wmOperatorType *ot)
Definition editfont.cc:1685
void FONT_OT_select_word(wmOperatorType *ot)
Definition editfont.cc:2131
void FONT_OT_unlink(wmOperatorType *ot)
Definition editfont.cc:2559
void CURVE_OT_shortest_path_pick(wmOperatorType *ot)
void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
void CURVE_OT_spline_weight_set(wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot)
void CURVE_OT_select_linked(wmOperatorType *ot)
void CURVE_OT_extrude(wmOperatorType *ot)
void CURVE_OT_make_segment(wmOperatorType *ot)
void FONT_OT_select_all(wmOperatorType *ot)
Definition editfont.cc:1073
void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot)
void CURVE_OT_hide(wmOperatorType *ot)
void CURVE_OT_normals_make_consistent(wmOperatorType *ot)
void FONT_OT_move(wmOperatorType *ot)
Definition editfont.cc:1485
void CURVE_OT_select_next(wmOperatorType *ot)
void CURVE_OT_shade_smooth(wmOperatorType *ot)
void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot)
void CURVE_OT_delete(wmOperatorType *ot)
void FONT_OT_text_cut(wmOperatorType *ot)
Definition editfont.cc:1165
void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
void CURVE_OT_spin(wmOperatorType *ot)
void FONT_OT_change_spacing(wmOperatorType *ot)
Definition editfont.cc:1580
void CURVE_OT_spline_type_set(wmOperatorType *ot)
void CURVE_OT_shade_flat(wmOperatorType *ot)
void FONT_OT_text_insert_unicode(wmOperatorType *ot)
Definition editfont.cc:793
void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
void FONT_OT_change_character(wmOperatorType *ot)
Definition editfont.cc:1638
void CURVE_OT_vertex_add(wmOperatorType *ot)
void FONT_OT_delete(wmOperatorType *ot)
Definition editfont.cc:1831
void FONT_OT_textbox_remove(wmOperatorType *ot)
Definition editfont.cc:2213
void CURVE_OT_select_all(wmOperatorType *ot)
void CURVE_OT_draw(wmOperatorType *ot)
void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
void FONT_OT_open(wmOperatorType *ot)
Definition editfont.cc:2506
void CURVE_OT_select_nth(wmOperatorType *ot)
void FONT_OT_text_paste_from_file(wmOperatorType *ot)
Definition editfont.cc:637
void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot)
void CURVE_OT_pen(wmOperatorType *ot)
void FONT_OT_move_select(wmOperatorType *ot)
Definition editfont.cc:1516
wmKeyMap * curve_pen_modal_keymap(wmKeyConfig *keyconf)
void CURVE_OT_de_select_first(wmOperatorType *ot)
void CURVE_OT_select_more(wmOperatorType *ot)
void CURVE_OT_separate(wmOperatorType *ot)
void CURVE_OT_smooth_tilt(wmOperatorType *ot)
void CURVE_OT_reveal(wmOperatorType *ot)
void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
void FONT_OT_case_set(wmOperatorType *ot)
Definition editfont.cc:2350
void CURVE_OT_duplicate(wmOperatorType *ot)
void FONT_OT_case_toggle(wmOperatorType *ot)
Definition editfont.cc:2397
void CURVE_OT_select_row(wmOperatorType *ot)
void CURVE_OT_de_select_last(wmOperatorType *ot)
void CURVE_OT_smooth_radius(wmOperatorType *ot)
void FONT_OT_selection_set(wmOperatorType *ot)
Definition editfont.cc:2094
void FONT_OT_text_paste(wmOperatorType *ot)
Definition editfont.cc:1271
void CURVE_OT_select_linked_pick(wmOperatorType *ot)
void CURVE_OT_smooth(wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot)
void CURVE_OT_split(wmOperatorType *ot)
void FONT_OT_text_insert(wmOperatorType *ot)
Definition editfont.cc:1971
void CURVE_OT_smooth_weight(wmOperatorType *ot)
void CURVE_OT_radius_set(wmOperatorType *ot)
void CURVE_OT_decimate(wmOperatorType *ot)
void CURVE_OT_handle_type_set(wmOperatorType *ot)
void CURVE_OT_subdivide(wmOperatorType *ot)
void FONT_OT_style_set(wmOperatorType *ot)
Definition editfont.cc:988
void CURVE_OT_tilt_clear(wmOperatorType *ot)
void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot)
void ED_operatortypes_curve()
Definition curve_ops.cc:23
void ED_operatormacros_curve()
Definition curve_ops.cc:122
void ED_keymap_curve(wmKeyConfig *keyconf)
Definition curve_ops.cc:146
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool(* poll)(struct bContext *)
wmOperatorType * ot
Definition wm_files.cc:4237
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:895
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)