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 **********************************/
|
|
|
|
|
|
New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1)
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
2009-01-22 15:52:04 +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
|
|
|
void sequencer_operatortypes(void)
|
|
|
|
|
{
|
2009-01-20 14:19:39 +00:00
|
|
|
/* sequencer_edit.c */
|
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
|
|
|
WM_operatortype_append(SEQUENCER_OT_cut);
|
2014-10-23 16:48:34 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_slip);
|
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
|
|
|
WM_operatortype_append(SEQUENCER_OT_mute);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_unmute);
|
2009-01-25 14:53:41 +00:00
|
|
|
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);
|
2010-07-03 22:25:22 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_reassign_inputs);
|
2010-10-30 12:04:00 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_swap_inputs);
|
2009-07-08 21:41:35 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_duplicate);
|
2009-01-21 18:47:09 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_delete);
|
2011-08-14 03:59:22 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_offset_clear);
|
2009-04-12 20:32:42 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_images_separate);
|
2009-01-23 23:14:02 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_meta_toggle);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_meta_make);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_meta_separate);
|
2018-06-04 09:31:30 +02:00
|
|
|
|
2013-03-26 20:34:13 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_gap_remove);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_gap_insert);
|
2009-06-09 21:29:59 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_snap);
|
2012-08-23 07:39:51 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_jump);
|
2009-12-15 10:04:54 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_swap);
|
2010-06-21 17:37:50 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_swap_data);
|
2009-11-08 15:03:10 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_rendersize);
|
2009-01-25 14:53:41 +00:00
|
|
|
|
2015-07-03 12:34:23 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_export_subtitles);
|
|
|
|
|
|
2012-09-21 13:29:38 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_copy);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_paste);
|
|
|
|
|
|
2009-01-25 14:53:41 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_all);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_selected);
|
2016-04-17 12:26:44 +12:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_frame);
|
2009-12-14 21:42:25 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_all_preview);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_toggle);
|
2010-06-17 14:22:54 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_zoom_ratio);
|
2010-07-08 10:03:29 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_ghost_border);
|
2009-12-14 21:42:25 +00:00
|
|
|
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_rebuild_proxy);
|
2015-03-26 15:44:51 +01:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_enable_proxies);
|
2011-08-12 06:08:22 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_change_effect_input);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_change_effect_type);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_change_path);
|
|
|
|
|
|
2009-01-20 14:19:39 +00:00
|
|
|
/* sequencer_select.c */
|
2012-01-14 07:23:57 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_all);
|
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
|
|
|
WM_operatortype_append(SEQUENCER_OT_select);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_more);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_less);
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_linked_pick);
|
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
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_linked);
|
2009-01-31 09:58:38 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_handles);
|
2009-02-13 14:16:56 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_active_side);
|
2018-10-05 10:27:04 +10:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_box);
|
2011-09-28 14:12:27 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_grouped);
|
|
|
|
|
|
2009-01-20 14:19:39 +00:00
|
|
|
/* sequencer_add.c */
|
2009-04-12 20:32:42 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_scene_strip_add);
|
2012-03-21 18:02:29 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_movieclip_strip_add);
|
2012-06-07 18:24:36 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_mask_strip_add);
|
2009-04-12 20:32:42 +00:00
|
|
|
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);
|
2009-12-17 14:45:47 +00:00
|
|
|
|
2012-09-21 13:29:38 +00:00
|
|
|
/* sequencer_buttons.c */
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_properties);
|
2012-08-19 15:41:56 +00:00
|
|
|
|
|
|
|
|
/* sequencer_modifiers.c */
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_remove);
|
2012-08-23 09:04:30 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_move);
|
2015-06-15 21:23:09 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_copy);
|
2012-08-23 16:14:52 +00:00
|
|
|
|
|
|
|
|
/* 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
|
|
|
}
|
|
|
|
|
|
New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1)
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
2009-01-22 15:52:04 +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
|
|
|
{
|
2012-03-09 13:31:20 +00:00
|
|
|
/* Common items ------------------------------------------------------------------ */
|
2018-11-08 15:59:51 +11:00
|
|
|
WM_keymap_ensure(keyconf, "SequencerCommon", SPACE_SEQ, 0);
|
2009-12-14 21:42:25 +00:00
|
|
|
|
2012-03-09 13:31:20 +00:00
|
|
|
/* Strips Region --------------------------------------------------------------- */
|
2018-11-08 15:59:51 +11:00
|
|
|
WM_keymap_ensure(keyconf, "Sequencer", SPACE_SEQ, 0);
|
2012-09-21 13:29:38 +00:00
|
|
|
|
2012-03-09 13:31:20 +00:00
|
|
|
/* Preview Region ----------------------------------------------------------- */
|
2018-11-08 15:59:51 +11:00
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
wmOperatorType *ot;
|
|
|
|
|
|
|
|
|
|
ot = WM_operatortype_append_macro("SEQUENCER_OT_duplicate_move", "Duplicate Strips",
|
|
|
|
|
"Duplicate selected strips and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
|
|
|
|
|
|
|
|
|
|
WM_operatortype_macro_define(ot, "SEQUENCER_OT_duplicate");
|
2015-04-02 13:47:39 +02:00
|
|
|
WM_operatortype_macro_define(ot, "TRANSFORM_OT_seq_slide");
|
2012-06-20 14:20:03 +00:00
|
|
|
}
|