2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2008 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
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-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup spseq
|
2011-02-27 20:29:51 +00:00
|
|
|
*/
|
|
|
|
|
|
2023-06-14 18:36:17 +02:00
|
|
|
#include <cmath>
|
|
|
|
|
#include <cstdlib>
|
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 "DNA_space_types.h"
|
|
|
|
|
|
2023-08-04 23:11:22 +02:00
|
|
|
#include "WM_api.hh"
|
|
|
|
|
#include "WM_types.hh"
|
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
|
|
|
|
2023-08-05 02:57:52 +02:00
|
|
|
#include "ED_sequencer.hh"
|
2014-11-24 18:18:35 +01:00
|
|
|
|
2023-09-08 08:23:01 -04:00
|
|
|
#include "sequencer_intern.hh"
|
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
|
|
|
|
|
|
|
|
/* ************************** registration **********************************/
|
|
|
|
|
|
2023-07-02 19:37:22 +10:00
|
|
|
void sequencer_operatortypes()
|
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
|
|
|
{
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `sequencer_edit.cc` */
|
2020-02-16 21:39:12 +01:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_split);
|
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);
|
2019-04-17 06:17:24 +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);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2015-07-03 12:34:23 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_export_subtitles);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-09-21 13:29:38 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_copy);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_paste);
|
2019-04-17 06:17:24 +02: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);
|
2022-05-16 19:41:50 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_change_scene);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-11-02 22:53:39 -07:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_set_range_to_strips);
|
2020-12-16 20:34:26 +01:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_transform_clear);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_transform_fit);
|
2019-11-02 22:53:39 -07:00
|
|
|
|
2021-09-29 14:29:32 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_color_tag_set);
|
2021-10-07 12:32:04 +11:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_cursor_set);
|
2023-01-30 07:47:29 +01:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_scene_frame_range_update);
|
2021-09-29 14:29:32 +02:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `sequencer_retiming.cc` */
|
2023-06-14 04:47:53 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_retiming_reset);
|
VSE: Improve retiming UI
Currently retiming is quite awkward, when you need to retime multiple
strips strips in sync. It is possible to use meta strips, but this is
still not great. This is resolved by implementing selection.
General changes:
Gizmos are removed, since they are designed to operate only on active
strip and don't support selection.
Transform operator code is implemented for retiming data, which allows
more sophisticated manipulation.
Instead of drawing marker-like symbols, keyframes are drawn to
represent retiming data. Retiming handles are now called keys. To have
consistent names, DNA structures have been renamed.
Retiming data is drawn on strip as overlay.
UI changes:
Retiming tool is removed. To edit retiming data, press Ctrl + R, select
a key and move it. When retiming is edited, retiming menu and
context menu shows more relevant features, like making transitions.
Strip and retiming key selection can not be combined. It is possible to
use box select operator to select keys, if any key is selected.
Otherwise strips are selected.
Adding retiming keys is possible with I shortcut or from menu.
Retiming keys are always drawn at strip left and right boundary. These
keys do not really exist until they are selected. This is to simplify
retiming of strips that are resized. These keys are called "fake keys"
in code.
API changes:
Functions, properties and types related to retiming handles are renamed
to retiming keys:
retiming_handle_add() -> retiming_key_add()
retiming_handle_move() -> retiming_key_move()
retiming_handle_remove() -> retiming_key_remove()
retiming_handles -> retiming_keys
RetimingHandle -> RetimingKey
Retiming editing "mode" is activated by setting `Sequence.show_retiming_keys`.
Pull Request: https://projects.blender.org/blender/blender/pulls/109044
2023-09-27 01:45:59 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_retiming_show);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_retiming_key_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_retiming_freeze_frame_add);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_retiming_transition_add);
|
2023-06-14 04:47:53 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_retiming_segment_speed_set);
|
|
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `sequencer_select.cc` */
|
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);
|
2019-11-01 08:39:03 +11:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_side);
|
2020-06-05 22:04:59 +10:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_side_of_frame);
|
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);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `sequencer_add.cc` */
|
2009-04-12 20:32:42 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_scene_strip_add);
|
2022-05-16 19:46:20 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_scene_strip_add_new);
|
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);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
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);
|
2023-08-30 22:36:36 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_strip_modifier_equalizer_redefine);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-08-23 16:14:52 +00:00
|
|
|
/* sequencer_view.h */
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_sample);
|
2020-06-11 15:45:37 +10:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_all);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_frame);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_all_preview);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_zoom_ratio);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_selected);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_ghost_border);
|
2022-04-04 12:52:48 +02:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `sequencer_channels_edit.cc` */
|
2022-04-04 12:52:48 +02:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_rename_channel);
|
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
|
|
|
{
|
2012-03-09 13:31:20 +00:00
|
|
|
/* Common items ------------------------------------------------------------------ */
|
2023-09-14 13:32:42 +10:00
|
|
|
WM_keymap_ensure(keyconf, "SequencerCommon", SPACE_SEQ, RGN_TYPE_WINDOW);
|
2009-12-14 21:42:25 +00:00
|
|
|
|
2012-03-09 13:31:20 +00:00
|
|
|
/* Strips Region --------------------------------------------------------------- */
|
2023-09-14 13:32:42 +10:00
|
|
|
WM_keymap_ensure(keyconf, "Sequencer", SPACE_SEQ, RGN_TYPE_WINDOW);
|
2012-09-21 13:29:38 +00:00
|
|
|
|
2012-03-09 13:31:20 +00:00
|
|
|
/* Preview Region ----------------------------------------------------------- */
|
2023-09-14 13:32:42 +10:00
|
|
|
WM_keymap_ensure(keyconf, "SequencerPreview", SPACE_SEQ, RGN_TYPE_WINDOW);
|
2022-04-04 12:52:48 +02:00
|
|
|
|
|
|
|
|
/* Channels Region ----------------------------------------------------------- */
|
2023-09-14 13:32:42 +10:00
|
|
|
WM_keymap_ensure(keyconf, "Sequencer Channels", SPACE_SEQ, RGN_TYPE_WINDOW);
|
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
|
|
|
}
|
|
|
|
|
|
2023-07-02 19:37:22 +10:00
|
|
|
void ED_operatormacros_sequencer()
|
2012-06-20 14:20:03 +00:00
|
|
|
{
|
|
|
|
|
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
|
|
|
}
|