Blender V4.3
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
9#include <cmath>
10#include <cstdlib>
11
12#include "DNA_scene_types.h"
13
14#include "RNA_access.hh"
15
16#include "WM_api.hh"
17#include "WM_types.hh"
18
19#include "ED_curve.hh"
20#include "ED_screen.hh"
21
22#include "curve_intern.hh"
23
24/************************* registration ****************************/
25
27{
30
35
37
43
46
50
53
56
59
62
68
78
84
91
96
111
121
123}
124
126{
128 wmOperatorTypeMacro *otmacro;
129
130 ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move",
131 "Add Duplicate",
132 "Duplicate curve and move",
134 WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
135 otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
136 RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
137 RNA_boolean_set(otmacro->ptr, "mirror", false);
138
139 ot = WM_operatortype_append_macro("CURVE_OT_extrude_move",
140 "Extrude Curve and Move",
141 "Extrude curve and move result",
143 WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
144 otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
145 RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
146 RNA_boolean_set(otmacro->ptr, "mirror", false);
147}
148
150{
151 /* only set in editmode font, by space_view3d listener */
152 wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Font", SPACE_EMPTY, RGN_TYPE_WINDOW);
153 keymap->poll = ED_operator_editfont;
154
155 /* only set in editmode curve, by space_view3d listener */
156 keymap = WM_keymap_ensure(keyconf, "Curve", SPACE_EMPTY, RGN_TYPE_WINDOW);
158
159 curve_pen_modal_keymap(keyconf);
160}
@ RGN_TYPE_WINDOW
@ SPACE_EMPTY
bool ED_operator_editsurfcurve(bContext *C)
bool ED_operator_editfont(bContext *C)
@ OPTYPE_UNDO
Definition WM_types.hh:162
@ OPTYPE_REGISTER
Definition WM_types.hh:160
void CURVE_OT_select_random(wmOperatorType *ot)
void FONT_OT_textbox_add(wmOperatorType *ot)
Definition editfont.cc:2123
void FONT_OT_style_toggle(wmOperatorType *ot)
Definition editfont.cc:1009
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:1109
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:1638
void FONT_OT_select_word(wmOperatorType *ot)
Definition editfont.cc:2085
void FONT_OT_unlink(wmOperatorType *ot)
Definition editfont.cc:2515
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:1053
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:1438
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:1144
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:1533
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:773
void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
void FONT_OT_change_character(wmOperatorType *ot)
Definition editfont.cc:1591
void CURVE_OT_vertex_add(wmOperatorType *ot)
void FONT_OT_delete(wmOperatorType *ot)
Definition editfont.cc:1784
void FONT_OT_textbox_remove(wmOperatorType *ot)
Definition editfont.cc:2167
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:2462
void CURVE_OT_select_nth(wmOperatorType *ot)
void FONT_OT_text_paste_from_file(wmOperatorType *ot)
Definition editfont.cc:626
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:1469
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:2305
void CURVE_OT_duplicate(wmOperatorType *ot)
void FONT_OT_case_toggle(wmOperatorType *ot)
Definition editfont.cc:2353
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:2048
void FONT_OT_text_paste(wmOperatorType *ot)
Definition editfont.cc:1250
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:1927
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:968
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:26
void ED_operatormacros_curve()
Definition curve_ops.cc:125
void ED_keymap_curve(wmKeyConfig *keyconf)
Definition curve_ops.cc:149
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool(* poll)(struct bContext *)
wmOperatorType * ot
Definition wm_files.cc:4125
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
Definition wm_keymap.cc:897
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)