2011-02-27 20:29:51 +00:00
|
|
|
/*
|
Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup spseq
|
2011-02-27 20:29:51 +00:00
|
|
|
*/
|
|
|
|
|
|
Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
|
|
#include "DNA_space_types.h"
|
|
|
|
|
|
|
|
|
|
#include "WM_api.h"
|
|
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
2012-09-15 01:52:28 +00:00
|
|
|
#include "ED_sequencer.h"
|
2012-03-09 13:31:20 +00:00
|
|
|
#include "ED_markers.h"
|
2009-07-08 16:17:47 +00:00
|
|
|
#include "ED_transform.h" /* transform keymap */
|
2018-08-14 10:28:41 +10:00
|
|
|
#include "ED_select_utils.h"
|
Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
|
|
|
|
2014-11-24 18:18:35 +01:00
|
|
|
#include "BKE_sequencer.h"
|
|
|
|
|
|
Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
|
|
|
#include "sequencer_intern.h"
|
|
|
|
|
|
|
|
|
|
/* ************************** registration **********************************/
|
|
|
|
|
|
|
|
|
|
void sequencer_operatortypes(void)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
/* sequencer_edit.c */
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_cut);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_slip);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_mute);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_unmute);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_lock);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_unlock);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_reload);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_refresh_all);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_reassign_inputs);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_swap_inputs);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_duplicate);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_delete);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_offset_clear);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_images_separate);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_meta_toggle);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_meta_make);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_meta_separate);
|
|
|
|
|
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_gap_remove);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_gap_insert);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_snap);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_jump);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_swap);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_swap_data);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_rendersize);
|
|
|
|
|
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_export_subtitles);
|
|
|
|
|
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_copy);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_paste);
|
|
|
|
|
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_all);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_selected);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_frame);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_all_preview);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_toggle);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_zoom_ratio);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_ghost_border);
|
|
|
|
|
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_rebuild_proxy);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_enable_proxies);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_change_effect_input);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_change_effect_type);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_change_path);
|
|
|
|
|
|
2019-11-02 22:53:39 -07:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_set_range_to_strips);
|
|
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* sequencer_select.c */
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_all);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_more);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_less);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_linked_pick);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_linked);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_handles);
|
2019-11-01 08:39:03 +11:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_side);
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_box);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_grouped);
|
|
|
|
|
|
|
|
|
|
/* sequencer_add.c */
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_scene_strip_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_movieclip_strip_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_mask_strip_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_movie_strip_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_sound_strip_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_image_strip_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_effect_strip_add);
|
|
|
|
|
|
|
|
|
|
/* sequencer_modifiers.c */
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_remove);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_move);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_copy);
|
|
|
|
|
|
|
|
|
|
/* sequencer_view.h */
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_sample);
|
Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
|
|
|
}
|
|
|
|
|
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
void sequencer_keymap(wmKeyConfig *keyconf)
|
Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
/* Common items ------------------------------------------------------------------ */
|
|
|
|
|
WM_keymap_ensure(keyconf, "SequencerCommon", SPACE_SEQ, 0);
|
2009-12-14 21:42:25 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* Strips Region --------------------------------------------------------------- */
|
|
|
|
|
WM_keymap_ensure(keyconf, "Sequencer", SPACE_SEQ, 0);
|
2012-09-21 13:29:38 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* Preview Region ----------------------------------------------------------- */
|
|
|
|
|
WM_keymap_ensure(keyconf, "SequencerPreview", SPACE_SEQ, 0);
|
Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
|
|
|
}
|
|
|
|
|
|
2012-06-20 14:20:03 +00:00
|
|
|
void ED_operatormacros_sequencer(void)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
wmOperatorType *ot;
|
2012-06-20 14:20:03 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ot = WM_operatortype_append_macro("SEQUENCER_OT_duplicate_move",
|
|
|
|
|
"Duplicate Strips",
|
|
|
|
|
"Duplicate selected strips and move them",
|
|
|
|
|
OPTYPE_UNDO | OPTYPE_REGISTER);
|
2012-06-20 14:20:03 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_operatortype_macro_define(ot, "SEQUENCER_OT_duplicate");
|
|
|
|
|
WM_operatortype_macro_define(ot, "TRANSFORM_OT_seq_slide");
|
2012-06-20 14:20:03 +00:00
|
|
|
}
|