Sequencer: srt export support.
[blender.git] / source / blender / editors / space_sequencer / sequencer_ops.c
1 /*
2  * ***** BEGIN GPL LICENSE BLOCK *****
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  * The Original Code is Copyright (C) 2008 Blender Foundation.
19  * All rights reserved.
20  *
21  *
22  * Contributor(s): Blender Foundation
23  *
24  * ***** END GPL LICENSE BLOCK *****
25  */
26
27 /** \file blender/editors/space_sequencer/sequencer_ops.c
28  *  \ingroup spseq
29  */
30
31 #include <stdlib.h>
32 #include <math.h>
33
34 #include "DNA_space_types.h"
35
36 #include "WM_api.h"
37 #include "WM_types.h"
38
39 #include "ED_sequencer.h"
40 #include "ED_markers.h"
41 #include "ED_transform.h" /* transform keymap */
42
43 #include "BKE_sequencer.h"
44
45 #include "sequencer_intern.h"
46
47
48 /* ************************** registration **********************************/
49
50
51 void sequencer_operatortypes(void)
52 {
53         /* sequencer_edit.c */
54         WM_operatortype_append(SEQUENCER_OT_cut);
55         WM_operatortype_append(SEQUENCER_OT_slip);
56         WM_operatortype_append(SEQUENCER_OT_mute);
57         WM_operatortype_append(SEQUENCER_OT_unmute);
58         WM_operatortype_append(SEQUENCER_OT_lock);
59         WM_operatortype_append(SEQUENCER_OT_unlock);
60         WM_operatortype_append(SEQUENCER_OT_reload);
61         WM_operatortype_append(SEQUENCER_OT_refresh_all);
62         WM_operatortype_append(SEQUENCER_OT_reassign_inputs);
63         WM_operatortype_append(SEQUENCER_OT_swap_inputs);
64         WM_operatortype_append(SEQUENCER_OT_duplicate);
65         WM_operatortype_append(SEQUENCER_OT_delete);
66         WM_operatortype_append(SEQUENCER_OT_offset_clear);
67         WM_operatortype_append(SEQUENCER_OT_images_separate);
68         WM_operatortype_append(SEQUENCER_OT_meta_toggle);
69         WM_operatortype_append(SEQUENCER_OT_meta_make);
70         WM_operatortype_append(SEQUENCER_OT_meta_separate);
71         
72         WM_operatortype_append(SEQUENCER_OT_gap_remove);
73         WM_operatortype_append(SEQUENCER_OT_gap_insert);
74         WM_operatortype_append(SEQUENCER_OT_snap);
75         WM_operatortype_append(SEQUENCER_OT_strip_jump);
76         WM_operatortype_append(SEQUENCER_OT_swap);
77         WM_operatortype_append(SEQUENCER_OT_swap_data);
78         WM_operatortype_append(SEQUENCER_OT_rendersize);
79
80         WM_operatortype_append(SEQUENCER_OT_export_subtitles);
81
82         WM_operatortype_append(SEQUENCER_OT_copy);
83         WM_operatortype_append(SEQUENCER_OT_paste);
84
85         WM_operatortype_append(SEQUENCER_OT_view_all);
86         WM_operatortype_append(SEQUENCER_OT_view_selected);
87         WM_operatortype_append(SEQUENCER_OT_view_all_preview);
88         WM_operatortype_append(SEQUENCER_OT_view_toggle);
89         WM_operatortype_append(SEQUENCER_OT_view_zoom_ratio);
90         WM_operatortype_append(SEQUENCER_OT_view_ghost_border);
91
92         WM_operatortype_append(SEQUENCER_OT_rebuild_proxy);
93         WM_operatortype_append(SEQUENCER_OT_enable_proxies);
94         WM_operatortype_append(SEQUENCER_OT_change_effect_input);
95         WM_operatortype_append(SEQUENCER_OT_change_effect_type);
96         WM_operatortype_append(SEQUENCER_OT_change_path);
97
98         /* sequencer_select.c */
99         WM_operatortype_append(SEQUENCER_OT_select_all);
100         WM_operatortype_append(SEQUENCER_OT_select);
101         WM_operatortype_append(SEQUENCER_OT_select_more);
102         WM_operatortype_append(SEQUENCER_OT_select_less);
103         WM_operatortype_append(SEQUENCER_OT_select_linked_pick);
104         WM_operatortype_append(SEQUENCER_OT_select_linked);
105         WM_operatortype_append(SEQUENCER_OT_select_handles);
106         WM_operatortype_append(SEQUENCER_OT_select_active_side);
107         WM_operatortype_append(SEQUENCER_OT_select_border);
108         WM_operatortype_append(SEQUENCER_OT_select_grouped);
109
110         /* sequencer_add.c */
111         WM_operatortype_append(SEQUENCER_OT_scene_strip_add);
112         WM_operatortype_append(SEQUENCER_OT_movieclip_strip_add);
113         WM_operatortype_append(SEQUENCER_OT_mask_strip_add);
114         WM_operatortype_append(SEQUENCER_OT_movie_strip_add);
115         WM_operatortype_append(SEQUENCER_OT_sound_strip_add);
116         WM_operatortype_append(SEQUENCER_OT_image_strip_add);
117         WM_operatortype_append(SEQUENCER_OT_effect_strip_add);
118
119         /* sequencer_buttons.c */
120         WM_operatortype_append(SEQUENCER_OT_properties);
121
122         /* sequencer_modifiers.c */
123         WM_operatortype_append(SEQUENCER_OT_strip_modifier_add);
124         WM_operatortype_append(SEQUENCER_OT_strip_modifier_remove);
125         WM_operatortype_append(SEQUENCER_OT_strip_modifier_move);
126         WM_operatortype_append(SEQUENCER_OT_strip_modifier_copy);
127
128         /* sequencer_view.h */
129         WM_operatortype_append(SEQUENCER_OT_sample);
130 }
131
132
133 void sequencer_keymap(wmKeyConfig *keyconf)
134 {
135         wmKeyMap *keymap;
136         wmKeyMapItem *kmi;
137         
138         /* Common items ------------------------------------------------------------------ */
139         keymap = WM_keymap_find(keyconf, "SequencerCommon", SPACE_SEQ, 0);
140
141         WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0);
142
143         kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", OKEY, KM_PRESS, KM_SHIFT, 0);
144         RNA_string_set(kmi->ptr, "data_path", "scene.sequence_editor.show_overlay");
145
146         /* operators common to sequence and preview view */
147         WM_keymap_add_item(keymap, "SEQUENCER_OT_view_toggle", TABKEY, KM_PRESS, KM_CTRL, 0);
148
149         /* Strips Region --------------------------------------------------------------- */
150         keymap = WM_keymap_find(keyconf, "Sequencer", SPACE_SEQ, 0);
151
152         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all", AKEY, KM_PRESS, 0, 0);
153         RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
154         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
155         RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
156
157         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, 0, 0);
158         RNA_enum_set(kmi->ptr, "type", SEQ_CUT_SOFT);
159         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, KM_SHIFT, 0);
160         RNA_enum_set(kmi->ptr, "type", SEQ_CUT_HARD);
161
162         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0);
163         RNA_boolean_set(kmi->ptr, "unselected", false);
164         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0);
165         RNA_boolean_set(kmi->ptr, "unselected", true);
166
167         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0);
168         RNA_boolean_set(kmi->ptr, "unselected", false);
169         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);
170         RNA_boolean_set(kmi->ptr, "unselected", true);
171
172         WM_keymap_add_item(keymap, "SEQUENCER_OT_lock", LKEY, KM_PRESS, KM_SHIFT, 0);
173         WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0);
174
175         WM_keymap_add_item(keymap, "SEQUENCER_OT_reassign_inputs", RKEY, KM_PRESS, 0, 0);
176
177         WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0);
178         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0);
179         RNA_boolean_set(kmi->ptr, "adjust_length", true);
180
181         WM_keymap_add_item(keymap, "SEQUENCER_OT_offset_clear", OKEY, KM_PRESS, KM_ALT, 0);
182
183         WM_keymap_add_item(keymap, "SEQUENCER_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
184
185         WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", XKEY, KM_PRESS, 0, 0);
186         WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", DELKEY, KM_PRESS, 0, 0);
187
188         WM_keymap_add_item(keymap, "SEQUENCER_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
189         WM_keymap_add_item(keymap, "SEQUENCER_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
190 #ifdef __APPLE__
191         WM_keymap_add_item(keymap, "SEQUENCER_OT_copy", CKEY, KM_PRESS, KM_OSKEY, 0);
192         WM_keymap_add_item(keymap, "SEQUENCER_OT_paste", VKEY, KM_PRESS, KM_OSKEY, 0);
193 #endif
194
195         WM_keymap_add_item(keymap, "SEQUENCER_OT_images_separate", YKEY, KM_PRESS, 0, 0);
196
197         WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_toggle", TABKEY, KM_PRESS, 0, 0);
198
199         WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_make", GKEY, KM_PRESS, KM_CTRL, 0);
200         WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_separate", GKEY, KM_PRESS, KM_ALT, 0);
201
202         WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
203         WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all", NDOF_BUTTON_FIT, KM_PRESS, 0, 0);
204         WM_keymap_add_item(keymap, "SEQUENCER_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
205
206         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEUPKEY, KM_PRESS, 0, 0);
207         RNA_boolean_set(kmi->ptr, "next", true);
208         RNA_boolean_set(kmi->ptr, "center", false);
209         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEDOWNKEY, KM_PRESS, 0, 0);
210         RNA_boolean_set(kmi->ptr, "next", false);
211         RNA_boolean_set(kmi->ptr, "center", false);
212
213         /* alt for center */
214         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEUPKEY, KM_PRESS, KM_ALT, 0);
215         RNA_boolean_set(kmi->ptr, "next", true);
216         RNA_boolean_set(kmi->ptr, "center", true);
217         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEDOWNKEY, KM_PRESS, KM_ALT, 0);
218         RNA_boolean_set(kmi->ptr, "next", false);
219         RNA_boolean_set(kmi->ptr, "center", true);
220
221         RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_swap", LEFTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "side", SEQ_SIDE_LEFT);
222         RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_swap", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "side", SEQ_SIDE_RIGHT);
223
224         RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "all", false);
225         RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "all", true);
226         WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_insert", EQUALKEY, KM_PRESS, KM_SHIFT, 0);
227         
228         WM_keymap_add_item(keymap, "SEQUENCER_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
229         WM_keymap_add_item(keymap, "SEQUENCER_OT_swap_inputs", SKEY, KM_PRESS, KM_ALT, 0);
230
231         /* multicam editing keyboard layout, switch to camera 1-10 using
232          * regular number keys */
233         {
234                 int keys[] = { ONEKEY, TWOKEY, THREEKEY, FOURKEY, FIVEKEY,
235                                    SIXKEY, SEVENKEY, EIGHTKEY, NINEKEY, ZEROKEY };
236                 int i;
237
238                 for (i = 1; i <= 10; i++) {
239                         RNA_int_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut_multicam", keys[i - 1], KM_PRESS, 0, 0)->ptr, "camera", i);
240                 }
241         }
242
243         /* Mouse selection, a bit verbose :/ */
244         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
245         RNA_boolean_set(kmi->ptr, "extend", false);
246         RNA_boolean_set(kmi->ptr, "linked_handle", false);
247         RNA_enum_set(kmi->ptr, "left_right", SEQ_SELECT_LR_NONE);
248         RNA_boolean_set(kmi->ptr, "linked_time", false);
249         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
250         RNA_boolean_set(kmi->ptr, "extend", true);
251         RNA_boolean_set(kmi->ptr, "linked_handle", false);
252         RNA_enum_set(kmi->ptr, "left_right", SEQ_SELECT_LR_NONE);
253         RNA_boolean_set(kmi->ptr, "linked_time", false);
254
255
256         /* 2.4x method, now use Alt for handles and select the side based on which handle was selected */
257 #if 0
258         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
259         RNA_boolean_set(kmi->ptr, "linked_left", true);
260         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
261         RNA_boolean_set(kmi->ptr, "linked_right", true);
262
263         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0);
264         RNA_boolean_set(kmi->ptr, "linked_left", true);
265         RNA_boolean_set(kmi->ptr, "linked_right", true);
266
267         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL | KM_ALT, 0);
268         RNA_boolean_set(kmi->ptr, "extend", true);
269         RNA_boolean_set(kmi->ptr, "linked_left", true);
270         RNA_boolean_set(kmi->ptr, "linked_right", true);
271
272         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
273         RNA_boolean_set(kmi->ptr, "extend", true);
274         RNA_boolean_set(kmi->ptr, "linked_left", true);
275
276         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0);
277         RNA_boolean_set(kmi->ptr, "extend", true);
278         RNA_boolean_set(kmi->ptr, "linked_right", true);
279 #endif
280
281         /* 2.5 method, Alt and use selected handle */
282         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
283         RNA_boolean_set(kmi->ptr, "extend", false);
284         RNA_boolean_set(kmi->ptr, "linked_handle", true);
285         RNA_enum_set(kmi->ptr, "left_right", SEQ_SELECT_LR_NONE);
286         RNA_boolean_set(kmi->ptr, "linked_time", false);
287
288         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0);
289         RNA_boolean_set(kmi->ptr, "extend", true);
290         RNA_boolean_set(kmi->ptr, "linked_handle", true);
291         RNA_enum_set(kmi->ptr, "left_right", SEQ_SELECT_LR_NONE);
292         RNA_boolean_set(kmi->ptr, "linked_time", false);
293
294         /* match action editor */
295         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
296         RNA_boolean_set(kmi->ptr, "extend", false);
297         RNA_boolean_set(kmi->ptr, "linked_handle", false);
298         RNA_enum_set(kmi->ptr, "left_right", SEQ_SELECT_LR_MOUSE);     /* grr, these conflict - only use left_right if not over an active seq */
299         RNA_boolean_set(kmi->ptr, "linked_time", true);
300         /* adjusted since 2.4 */
301
302         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
303         RNA_boolean_set(kmi->ptr, "extend", true);
304         RNA_boolean_set(kmi->ptr, "linked_handle", false);
305         RNA_enum_set(kmi->ptr, "left_right", SEQ_SELECT_LR_NONE);
306         RNA_boolean_set(kmi->ptr, "linked_time", true);
307
308         WM_keymap_add_item(keymap, "SEQUENCER_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
309         WM_keymap_add_item(keymap, "SEQUENCER_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
310
311         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
312         RNA_boolean_set(kmi->ptr, "extend", false);
313         kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0);
314         RNA_boolean_set(kmi->ptr, "extend", true);
315
316         WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
317
318         WM_keymap_add_item(keymap, "SEQUENCER_OT_select_border", BKEY, KM_PRESS, 0, 0);
319
320         WM_keymap_add_item(keymap, "SEQUENCER_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
321
322         WM_keymap_add_menu(keymap, "SEQUENCER_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
323
324         WM_keymap_add_menu(keymap, "SEQUENCER_MT_change", CKEY, KM_PRESS, 0, 0);
325
326         WM_keymap_add_item(keymap, "SEQUENCER_OT_slip", SKEY, KM_PRESS, 0, 0);
327
328         kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_int", OKEY, KM_PRESS, 0, 0);
329         RNA_string_set(kmi->ptr, "data_path", "scene.sequence_editor.overlay_frame");
330         RNA_int_set(kmi->ptr, "value", 0);
331
332         transform_keymap_for_space(keyconf, keymap, SPACE_SEQ);
333
334         /* special markers hotkeys for anim editors: see note in definition of this function */
335         ED_marker_keymap_animedit_conflictfree(keymap);
336
337
338         /* Preview Region ----------------------------------------------------------- */
339         keymap = WM_keymap_find(keyconf, "SequencerPreview", SPACE_SEQ, 0);
340         WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all_preview", HOMEKEY, KM_PRESS, 0, 0);
341         WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all_preview", NDOF_BUTTON_FIT, KM_PRESS, 0, 0);
342
343         WM_keymap_add_item(keymap, "SEQUENCER_OT_view_ghost_border", OKEY, KM_PRESS, 0, 0);
344
345         /* would prefer to use numpad keys for job */
346         RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD1, KM_PRESS, 0, 0)->ptr, "ratio", 1.0f);
347
348         /* Setting zoom levels is not that useful, except for back to zoom level 1, removing keymap because of conflicts for now */
349 #if 0
350         RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD8, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 8.0f);
351         RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD4, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 4.0f);
352         RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD2, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 2.0f);
353
354         RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD2, KM_PRESS, 0, 0)->ptr, "ratio", 0.5f);
355         RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f);
356         RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD8, KM_PRESS, 0, 0)->ptr, "ratio", 0.125f);
357 #endif
358
359         /* sample */
360         WM_keymap_add_item(keymap, "SEQUENCER_OT_sample", ACTIONMOUSE, KM_PRESS, 0, 0);
361 }
362
363 void ED_operatormacros_sequencer(void)
364 {
365         wmOperatorType *ot;
366
367         ot = WM_operatortype_append_macro("SEQUENCER_OT_duplicate_move", "Duplicate Strips",
368                                           "Duplicate selected strips and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
369
370         WM_operatortype_macro_define(ot, "SEQUENCER_OT_duplicate");
371         WM_operatortype_macro_define(ot, "TRANSFORM_OT_seq_slide");
372 }