Blender V4.3
action_ops.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include <cmath>
10#include <cstdlib>
11
12#include "DNA_space_types.h"
13
14#include "ED_anim_api.hh"
15#include "ED_transform.hh"
16
17#include "action_intern.hh"
18
19#include "RNA_access.hh"
20
21#include "WM_api.hh"
22#include "WM_types.hh"
23
24/* ************************** registration - operator types **********************************/
25
27{
28 /* keyframes */
29 /* selection */
40
41 /* editing */
57
60
64
67
72
74}
75
77{
79 wmOperatorTypeMacro *otmacro;
80
81 ot = WM_operatortype_append_macro("ACTION_OT_duplicate_move",
82 "Duplicate",
83 "Make a copy of all selected keyframes and move them",
85 WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
86 otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
87 RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_TRANSLATE);
88 RNA_boolean_set(otmacro->ptr, "use_duplicated_keyframes", true);
89 RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false);
90}
91
92/* ************************** registration - keymaps **********************************/
93
94/* --------------- */
95
97{
98 /* keymap for all regions */
99 WM_keymap_ensure(keyconf, "Dopesheet Generic", SPACE_ACTION, RGN_TYPE_WINDOW);
100
101 /* channels */
102 /* Channels are not directly handled by the Action Editor module,
103 * but are inherited from the Animation module.
104 * All the relevant operations, keymaps, drawing, etc.
105 * can therefore all be found in that module instead, as these
106 * are all used for the Graph-Editor too.
107 */
108
109 /* keyframes */
110 WM_keymap_ensure(keyconf, "Dopesheet", SPACE_ACTION, RGN_TYPE_WINDOW);
111}
@ RGN_TYPE_WINDOW
@ SPACE_ACTION
@ TFM_TIME_TRANSLATE
@ OPTYPE_UNDO
Definition WM_types.hh:162
@ OPTYPE_REGISTER
Definition WM_types.hh:160
void ACTION_OT_layer_prev(wmOperatorType *ot)
void ACTION_OT_push_down(wmOperatorType *ot)
void ACTION_OT_unlink(wmOperatorType *ot)
void ACTION_OT_stash_and_create(wmOperatorType *ot)
void ACTION_OT_stash(wmOperatorType *ot)
void ACTION_OT_new(wmOperatorType *ot)
void ACTION_OT_layer_next(wmOperatorType *ot)
void ACTION_OT_view_selected(wmOperatorType *ot)
void ACTION_OT_keyframe_type(wmOperatorType *ot)
void ACTION_OT_easing_type(wmOperatorType *ot)
void ACTION_OT_view_all(wmOperatorType *ot)
void ACTION_OT_previewrange_set(wmOperatorType *ot)
void ACTION_OT_duplicate(wmOperatorType *ot)
void ACTION_OT_delete(wmOperatorType *ot)
void ACTION_OT_view_frame(wmOperatorType *ot)
void ACTION_OT_extrapolation_type(wmOperatorType *ot)
void ACTION_OT_keyframe_insert(wmOperatorType *ot)
void ACTION_OT_snap(wmOperatorType *ot)
void ACTION_OT_bake_keys(wmOperatorType *ot)
void ACTION_OT_frame_jump(wmOperatorType *ot)
void ACTION_OT_paste(wmOperatorType *ot)
void ACTION_OT_copy(wmOperatorType *ot)
void ACTION_OT_markers_make_local(wmOperatorType *ot)
void ACTION_OT_interpolation_type(wmOperatorType *ot)
void ACTION_OT_handle_type(wmOperatorType *ot)
void ACTION_OT_mirror(wmOperatorType *ot)
void ACTION_OT_clean(wmOperatorType *ot)
void ACTION_OT_select_column(wmOperatorType *ot)
void ACTION_OT_select_less(wmOperatorType *ot)
void ACTION_OT_select_all(wmOperatorType *ot)
void ACTION_OT_select_lasso(wmOperatorType *ot)
void ACTION_OT_select_leftright(wmOperatorType *ot)
void ACTION_OT_select_linked(wmOperatorType *ot)
void ACTION_OT_select_box(wmOperatorType *ot)
void ACTION_OT_select_circle(wmOperatorType *ot)
void ACTION_OT_clickselect(wmOperatorType *ot)
void ACTION_OT_select_more(wmOperatorType *ot)
void action_operatortypes()
Definition action_ops.cc:26
void ED_operatormacros_action()
Definition action_ops.cc:76
void action_keymap(wmKeyConfig *keyconf)
Definition action_ops.cc:96
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
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)