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
|
|
|
|
|
|
|
|
/**
|
2010-03-21 01:14:04 +00:00
|
|
|
* $Id$
|
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
|
|
|
*
|
|
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "DNA_space_types.h"
|
|
|
|
|
|
2009-11-10 20:43:45 +00:00
|
|
|
#include "BLI_math.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 "BLI_blenlib.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "WM_api.h"
|
|
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
2009-07-08 16:17:47 +00:00
|
|
|
#include "ED_transform.h" /* transform keymap */
|
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);
|
|
|
|
|
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);
|
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);
|
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);
|
2009-06-09 21:29:59 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_snap);
|
2009-10-28 19:53:25 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_next_edit);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_previous_edit);
|
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
|
|
|
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_all);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_view_selected);
|
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
|
|
|
|
2009-01-20 14:19:39 +00:00
|
|
|
/* sequencer_select.c */
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_all_toggle);
|
2009-07-08 21:31:28 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_inverse);
|
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);
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_select_border);
|
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);
|
|
|
|
|
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-06-08 10:38:28 +00:00
|
|
|
WM_operatortype_append(SEQUENCER_OT_properties);
|
2009-12-17 14:45:47 +00:00
|
|
|
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_copy);
|
|
|
|
|
WM_operatortype_append(SEQUENCER_OT_paste);
|
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
|
|
|
{
|
2009-12-14 21:42:25 +00:00
|
|
|
wmKeyMap *keymap= WM_keymap_find(keyconf, "SequencerCommon", SPACE_SEQ, 0);
|
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
|
|
|
wmKeyMapItem *kmi;
|
2009-12-14 21:42:25 +00:00
|
|
|
|
2010-07-08 14:01:48 +00:00
|
|
|
kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", OKEY, KM_PRESS, KM_SHIFT, 0);
|
|
|
|
|
RNA_string_set(kmi->ptr, "data_path", "scene.sequence_editor.show_overlay");
|
|
|
|
|
|
2009-12-14 21:42:25 +00:00
|
|
|
/* operators common to sequence and preview view */
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_toggle", TABKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
|
|
|
|
|
/* operators for sequence */
|
|
|
|
|
keymap= WM_keymap_find(keyconf, "Sequencer", SPACE_SEQ, 0);
|
2010-09-05 15:18:45 +00:00
|
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "MARKER_OT_add", MKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "MARKER_OT_move", GKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "MARKER_OT_duplicate", DKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "MARKER_OT_delete", XKEY, KM_PRESS, KM_SHIFT, 0);
|
|
|
|
|
|
2009-06-08 10:38:28 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0);
|
|
|
|
|
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
|
2009-07-08 21:31:28 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 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
|
|
|
|
|
|
|
|
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, 0, 0)->ptr, "type", SEQ_CUT_SOFT);
|
|
|
|
|
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", SEQ_CUT_HARD);
|
|
|
|
|
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0);
|
|
|
|
|
RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
|
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
|
|
|
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0);
|
|
|
|
|
RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "unselected", 1);
|
2009-01-21 18:47:09 +00:00
|
|
|
|
2009-01-25 14:53:41 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_lock", LKEY, KM_PRESS, KM_SHIFT, 0);
|
2009-07-28 18:59:36 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
|
2009-01-25 14:53:41 +00:00
|
|
|
|
2010-07-03 22:25:22 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_reassign_inputs", RKEY, KM_PRESS, 0, 0);
|
2009-01-25 14:53:41 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0);
|
|
|
|
|
|
2009-07-08 21:41:35 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
|
2009-01-21 18:47:09 +00:00
|
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", XKEY, KM_PRESS, 0, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", DELKEY, KM_PRESS, 0, 0);
|
|
|
|
|
|
2009-12-17 16:28:45 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
|
2009-04-12 20:32:42 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_images_separate", YKEY, KM_PRESS, 0, 0);
|
2009-01-23 23:14:02 +00:00
|
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_toggle", TABKEY, KM_PRESS, 0, 0);
|
|
|
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_make", MKEY, KM_PRESS, 0, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_separate", MKEY, KM_PRESS, KM_ALT, 0);
|
2009-01-25 14:53:41 +00:00
|
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
|
2009-01-31 09:58:38 +00:00
|
|
|
|
2009-10-28 19:53:25 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_next_edit", PAGEUPKEY, KM_PRESS, 0, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_previous_edit", PAGEDOWNKEY, KM_PRESS, 0, 0);
|
|
|
|
|
|
2009-12-15 10:04:54 +00:00
|
|
|
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_swap", LEFTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "side", SEQ_SIDE_LEFT);
|
|
|
|
|
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_swap", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "side", SEQ_SIDE_RIGHT);
|
2009-10-30 21:40:07 +00:00
|
|
|
|
2009-11-17 10:12:35 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0);
|
2010-07-19 17:47:58 +00:00
|
|
|
|
|
|
|
|
/* multicam editing keyboard layout, switch to camera 1-10 using
|
|
|
|
|
regular number keys */
|
|
|
|
|
{
|
|
|
|
|
int keys[] = { ONEKEY, TWOKEY, THREEKEY, FOURKEY, FIVEKEY,
|
|
|
|
|
SIXKEY, SEVENKEY, EIGHTKEY, NINEKEY, ZEROKEY };
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
for (i = 1; i <= 10; i++) {
|
|
|
|
|
RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut_multicam", keys[i-1], KM_PRESS, 0, 0)->ptr, "camera", i);
|
|
|
|
|
}
|
|
|
|
|
}
|
2009-02-15 17:24:09 +00:00
|
|
|
|
|
|
|
|
/* Mouse selection, a bit verbose :/ */
|
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_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
|
2009-02-15 17:24:09 +00:00
|
|
|
RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
|
2009-10-19 12:27:40 +00:00
|
|
|
|
2009-11-14 20:46:18 +00:00
|
|
|
|
2009-10-19 12:27:40 +00:00
|
|
|
/* 2.4x method, now use Alt for handles and select the side based on which handle was selected */
|
|
|
|
|
/*
|
2009-02-15 17:24:09 +00:00
|
|
|
RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "linked_left", 1);
|
|
|
|
|
RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "linked_right", 1);
|
|
|
|
|
|
|
|
|
|
kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_left", 1);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_right", 1);
|
|
|
|
|
|
|
|
|
|
kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL|KM_ALT, 0);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "extend", 1);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_left", 1);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_right", 1);
|
|
|
|
|
|
|
|
|
|
kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "extend", 1);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_left", 1);
|
|
|
|
|
|
|
|
|
|
kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "extend", 1);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_right", 1);
|
2009-10-19 12:27:40 +00:00
|
|
|
*/
|
2009-02-15 17:24:09 +00:00
|
|
|
|
2009-10-19 12:27:40 +00:00
|
|
|
/* 2.5 method, Alt and use selected handle */
|
|
|
|
|
RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "linked_handle", 1);
|
|
|
|
|
|
|
|
|
|
kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "extend", 1);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_handle", 1);
|
|
|
|
|
|
|
|
|
|
/* match action editor */
|
2009-11-14 20:46:18 +00:00
|
|
|
kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "left_right", 1); /* grr, these conflict - only use left_right if not over an active seq */
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_time", 1);
|
2009-10-19 12:27:40 +00:00
|
|
|
/* adjusted since 2.4 */
|
2009-02-15 17:24:09 +00:00
|
|
|
|
2009-11-14 20:46:18 +00:00
|
|
|
kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "extend", 1);
|
|
|
|
|
RNA_boolean_set(kmi->ptr, "linked_time", 1);
|
|
|
|
|
|
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_keymap_add_item(keymap, "SEQUENCER_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
|
|
|
|
|
RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
|
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_keymap_add_item(keymap, "SEQUENCER_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
|
|
|
|
|
|
2009-03-29 02:15:13 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_select_border", BKEY, KM_PRESS, 0, 0);
|
2009-10-06 13:04:31 +00:00
|
|
|
|
2009-11-17 15:29:55 +00:00
|
|
|
WM_keymap_add_menu(keymap, "SEQUENCER_MT_add", AKEY, KM_PRESS, KM_SHIFT, 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
|
|
|
|
2010-07-08 10:03:29 +00:00
|
|
|
kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", OKEY, KM_PRESS, 0, 0);
|
|
|
|
|
RNA_string_set(kmi->ptr, "data_path", "scene.sequence_editor.overlay_frame");
|
|
|
|
|
RNA_int_set(kmi->ptr, "value", 0);
|
|
|
|
|
|
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
|
|
|
transform_keymap_for_space(keyconf, keymap, SPACE_SEQ);
|
2009-12-14 21:42:25 +00:00
|
|
|
|
|
|
|
|
keymap= WM_keymap_find(keyconf, "SequencerPreview", SPACE_SEQ, 0);
|
|
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all_preview", HOMEKEY, KM_PRESS, 0, 0);
|
2010-04-18 12:19:07 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0);
|
2010-06-17 14:22:54 +00:00
|
|
|
|
2010-07-08 10:03:29 +00:00
|
|
|
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_ghost_border", OKEY, KM_PRESS, 0, 0);
|
|
|
|
|
|
2010-06-17 14:22:54 +00:00
|
|
|
/* would prefer to use numpad keys for job */
|
2010-07-18 14:46:52 +00:00
|
|
|
RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD1, KM_PRESS, 0, 0)->ptr, "ratio", 1.0f);
|
|
|
|
|
|
|
|
|
|
/* Setting zoom levels is not that useful, except for back to zoom level 1, removing keymap because of conflicts for now */
|
|
|
|
|
#if 0
|
2010-06-17 14:22:54 +00:00
|
|
|
RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD8, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 8.0f);
|
|
|
|
|
RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD4, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 4.0f);
|
|
|
|
|
RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD2, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 2.0f);
|
2010-07-18 14:46:52 +00:00
|
|
|
|
2010-06-17 14:22:54 +00:00
|
|
|
RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD2, KM_PRESS, 0, 0)->ptr, "ratio", 0.5f);
|
|
|
|
|
RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f);
|
|
|
|
|
RNA_float_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom_ratio", PAD8, KM_PRESS, 0, 0)->ptr, "ratio", 0.125f);
|
2010-07-18 14:46:52 +00:00
|
|
|
#endif
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|