Page MenuHome
Paste P1027

Sequencer toolbar
ActivePublic

Authored by Eitan (EitanSomething) on Jul 8 2019, 4:02 AM.
diff --git a/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py b/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
index a98fa2c1fa8..d032b17d34a 100644
--- a/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
+++ b/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
@@ -166,7 +166,7 @@ _km_hierarchy = [
('Node Generic', 'NODE_EDITOR', 'WINDOW', []),
]),
('Sequencer', 'SEQUENCE_EDITOR', 'WINDOW', [
- ('SequencerCommon', 'SEQUENCE_EDITOR', 'WINDOW', []),
+ ('Sequencer Generic', 'SEQUENCE_EDITOR', 'WINDOW', []),
('SequencerPreview', 'SEQUENCE_EDITOR', 'WINDOW', []),
]),
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 8a35a937928..ce58ea2583f 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -2275,17 +2275,17 @@ def km_text(params):
return keymap
-
-def km_sequencercommon(_params):
+def km_sequencer_generic(_params):
items = []
keymap = (
- "SequencerCommon",
+ "Sequencer Generic",
{"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'},
{"items": items},
)
items.extend([
*_template_space_region_type_toggle(
+ toolbar_key={"type": 'T', "value": 'PRESS'},
sidebar_key={"type": 'N', "value": 'PRESS'},
),
("wm.context_toggle", {"type": 'O', "value": 'PRESS', "shift": True},
@@ -5923,6 +5923,39 @@ def km_3d_view_tool_sculpt_gpencil_select_lasso(params):
)
+def km_sequencer_editor_tool_select(params):
+ return (
+ "Sequencer Tool: Select",
+ {"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'},
+ {"items": [
+ ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS'},
+ {"properties": [("extend", False), ("deselect_all", not params.legacy)]}),
+ ]},
+ )
+
+
+def km_sequencer_editor_tool_select_box(params):
+ return (
+ "Sequencer Tool: Select Box",
+ {"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'},
+ {"items": _template_items_tool_select_actions_simple(
+ "sequencer.select_box", type=params.tool_tweak, value='ANY',
+ properties=[("tweak", True)],
+ )},
+ )
+
+
+def km_sequencer_editor_tool_cut(params):
+ return (
+ "Sequencer Tool: Cut",
+ {"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'},
+ {"items":[
+ ("sequencer.cut", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("type", 'SOFT')]}),
+ ]},
+ )
+
+
# ------------------------------------------------------------------------------
# Full Configuration
@@ -5966,7 +5999,7 @@ def generate_keymaps(params=None):
km_nla_editor(params),
km_text_generic(params),
km_text(params),
- km_sequencercommon(params),
+ km_sequencer_generic(params),
km_sequencer(params),
km_sequencerpreview(params),
km_console(params),
@@ -6132,6 +6165,9 @@ def generate_keymaps(params=None):
km_3d_view_tool_sculpt_gpencil_select_box(params),
km_3d_view_tool_sculpt_gpencil_select_circle(params),
km_3d_view_tool_sculpt_gpencil_select_lasso(params),
+ km_sequencer_editor_tool_select(params),
+ km_sequencer_editor_tool_select_box(params),
+ km_sequencer_editor_tool_cut(params),
]
# ------------------------------------------------------------------------------
diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
index d96a1d335fa..2dd89eda370 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -1646,10 +1646,10 @@ def km_text(params):
return keymap
-def km_sequencercommon(_params):
+def km_sequencer_generic(_params):
items = []
keymap = (
- "SequencerCommon",
+ "Sequencer Generic",
{"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'},
{"items": items},
)
@@ -3734,7 +3734,7 @@ def generate_keymaps(params=None):
km_nla_editor(params),
km_text_generic(params),
km_text(params),
- km_sequencercommon(params),
+ km_sequencer_generic(params),
km_sequencer(params),
km_sequencerpreview(params),
km_console(params),
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index d5ef24d7ff3..670c3219c3d 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -30,6 +30,9 @@ from bpy.app.translations import (
from bl_ui.properties_grease_pencil_common import (
AnnotationDataPanel,
)
+from bl_ui.space_toolsystem_common import (
+ ToolActivePanelHelper,
+)
from rna_prop_ui import PropertyPanel
@@ -87,7 +90,10 @@ def draw_color_balance(layout, color_balance):
col.prop(color_balance, "gain", text="")
col.prop(color_balance, "invert_gain", text="Invert", icon='ARROW_LEFTRIGHT')
split.template_color_picker(color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True)
-
+class SEQUENCER_PT_active_tool(ToolActivePanelHelper, Panel):
+ bl_space_type = 'SEQUENCE_EDITOR'
+ bl_region_type = 'UI'
+ bl_category = "Tool"
class SEQUENCER_HT_header(Header):
bl_space_type = 'SEQUENCE_EDITOR'
@@ -201,6 +207,7 @@ class SEQUENCER_MT_view(Menu):
# wm_keymap_item_find_props() (see #32595).
layout.operator_context = 'INVOKE_REGION_PREVIEW'
layout.prop(st, "show_region_ui")
+ layout.prop(st, "show_region_toolbar")
layout.operator_context = 'INVOKE_DEFAULT'
if st.view_type == 'SEQUENCER':
@@ -2042,7 +2049,7 @@ classes = (
SEQUENCER_MT_strip_input,
SEQUENCER_MT_strip_lock_mute,
SEQUENCER_MT_context_menu,
-
+ SEQUENCER_PT_active_tool,
SEQUENCER_PT_strip,
SEQUENCER_PT_adjust,
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 5a1398d0582..d0a7796f5d3 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -359,6 +359,12 @@ class ToolSelectPanelHelper:
if tool is not None:
tool.refresh_from_context()
return tool
+ elif space_type == 'SEQUENCE_EDITOR':
+ space_data = context.space_data
+ tool = context.workspace.tools.from_space_sequencer(create=create)
+ if tool is not None:
+ tool.refresh_from_context()
+ return tool
return None
@staticmethod
@@ -625,6 +631,8 @@ class ToolSelectPanelHelper:
return space_type, space_data.mode
elif space_type == 'NODE_EDITOR':
return space_type, None
+ elif space_type == 'SEQUENCE_EDITOR':
+ return space_type, None
else:
return None, None
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 13e9e5350b2..7a0dce38189 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1620,6 +1620,52 @@ class _defs_node_edit:
keymap="Node Tool: Links Cut",
)
+class _defs_sequencer_generic:
+
+ @ToolDef.from_fn
+ def cut():
+ def draw_settings(_context, _layout, _tool):
+ pass
+ return dict(
+ idname="builtin.cut",
+ label="Cut",
+ icon="ops.mesh.knife_tool",
+ widget=None,
+ keymap="Sequencer Tool: Cut",
+ draw_settings=draw_settings,
+ )
+
+class _defs_sequencer_select:
+ @ToolDef.from_fn
+ def select():
+ def draw_settings(_context, _layout, _tool):
+ pass
+ return dict(
+ idname="builtin.select",
+ label="Select",
+ icon="ops.generic.select",
+ widget=None,
+ keymap="Sequencer Tool: Select",
+ draw_settings=draw_settings,
+ )
+ @ToolDef.from_fn
+ def box():
+ def draw_settings(_context, layout, tool):
+ props = tool.operator_properties("sequencer.select_box")
+ row = layout.row()
+ row.use_property_split = False
+ row.prop(props, "mode", text="", expand=True, icon_only=True)
+ pass
+ return dict(
+ idname="builtin.select_box",
+ label="Select Box",
+ icon="ops.generic.select_box",
+ widget=None,
+ keymap="Sequencer Tool: Select Box",
+ draw_settings=draw_settings,
+ )
+
+
class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel):
bl_space_type = 'IMAGE_EDITOR'
@@ -2034,12 +2080,59 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_gpencil_weight.generate_from_brushes,
],
}
+class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel):
+ bl_space_type = 'SEQUENCE_EDITOR'
+ bl_region_type = 'TOOLS'
+ bl_label = "Tools" # not visible
+ bl_options = {'HIDE_HEADER'}
+
+ # Satisfy the 'ToolSelectPanelHelper' API.
+ keymap_prefix = "Sequence Editor Tool:"
+ @classmethod
+ def tools_from_context(cls, context, mode=None):
+ # if mode is None:
+ # mode = context.mode
+ for tools in (cls._tools[None], ):
+ for item in tools:
+ if not (type(item) is ToolDef) and callable(item):
+ yield from item(context)
+ else:
+ yield item
+ @classmethod
+ def tools_all(cls):
+ yield from cls._tools.items()
+
+ _tools_select = (
+ (
+ _defs_sequencer_select.select,
+ _defs_sequencer_select.box,
+ ),
+ )
+ _tools_annotate = (
+ (
+ _defs_annotate.scribble,
+ _defs_annotate.line,
+ _defs_annotate.poly,
+ _defs_annotate.eraser,
+ ),
+ )
+
+ _tools = {
+ None: [
+ *_tools_select,
+ None,
+ _defs_sequencer_generic.cut,
+ None,
+ *_tools_annotate,
+ ],
+ }
classes = (
IMAGE_PT_tools_active,
NODE_PT_tools_active,
VIEW3D_PT_tools_active,
+ SEQUENCER_PT_tools_active,
)
if __name__ == "__main__": # only for live edit.
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 0dbb1a92f30..29e1e392480 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3568,5 +3568,24 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+ for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+ for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_SEQ) {
+ ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
+ ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS);
+ ARegion *header = BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
+ if (!ar) {
+ ar = MEM_callocN(sizeof(ARegion), "tools for sequencer");
+ BLI_insertlinkafter(regionbase, header, ar);
+ ar->regiontype = RGN_TYPE_TOOLS;
+ ar->alignment = RGN_ALIGN_LEFT;
+ ar->flag = RGN_FLAG_HIDDEN;
+ }
+ }
+ }
+ }
+ }
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index b0bb775de83..dab631ffc5d 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -122,7 +122,7 @@ void sequencer_operatortypes(void)
void sequencer_keymap(wmKeyConfig *keyconf)
{
/* Common items ------------------------------------------------------------------ */
- WM_keymap_ensure(keyconf, "SequencerCommon", SPACE_SEQ, 0);
+ WM_keymap_ensure(keyconf, "Sequencer Generic", SPACE_SEQ, 0);
/* Strips Region --------------------------------------------------------------- */
WM_keymap_ensure(keyconf, "Sequencer", SPACE_SEQ, 0);
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 12b446c3f4c..5b34c79216e 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -110,6 +110,14 @@ static SpaceLink *sequencer_new(const ScrArea *UNUSED(sa), const Scene *scene)
ar->alignment = RGN_ALIGN_RIGHT;
ar->flag = RGN_FLAG_HIDDEN;
+ /* toolbar */
+ ar = MEM_callocN(sizeof(ARegion), "tools for sequencer");
+
+ BLI_addtail(&sseq->regionbase, ar);
+ ar->regiontype = RGN_TYPE_TOOLS;
+ ar->alignment = RGN_ALIGN_LEFT;
+ ar->flag = RGN_FLAG_HIDDEN;
+
/* preview region */
/* NOTE: if you change values here, also change them in sequencer_init_preview_region */
ar = MEM_callocN(sizeof(ARegion), "preview region for sequencer");
@@ -484,7 +492,7 @@ static void sequencer_main_region_init(wmWindowManager *wm, ARegion *ar)
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
#endif
- keymap = WM_keymap_ensure(wm->defaultconf, "SequencerCommon", SPACE_SEQ, 0);
+ keymap = WM_keymap_ensure(wm->defaultconf, "Sequencer Generic", SPACE_SEQ, 0);
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
/* own keymap */
@@ -618,6 +626,22 @@ static void sequencer_header_region_draw(const bContext *C, ARegion *ar)
ED_region_header(C, ar);
}
+/* *********************** toolbar region ************************ */
+/* add handlers, stuff you only do once or on area/region changes */
+static void sequencer_tools_region_init(wmWindowManager *wm, ARegion *ar)
+{
+ wmKeyMap *keymap;
+
+ ED_region_panels_init(wm, ar);
+
+ keymap = WM_keymap_ensure(wm->defaultconf, "Sequencer Generic", SPACE_SEQ, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+}
+
+static void sequencer_tools_region_draw(const bContext *C, ARegion *ar)
+{
+ ED_region_panels(C, ar);
+}
/* *********************** preview region ************************ */
static void sequencer_preview_region_init(wmWindowManager *wm, ARegion *ar)
{
@@ -630,7 +654,7 @@ static void sequencer_preview_region_init(wmWindowManager *wm, ARegion *ar)
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
#endif
- keymap = WM_keymap_ensure(wm->defaultconf, "SequencerCommon", SPACE_SEQ, 0);
+ keymap = WM_keymap_ensure(wm->defaultconf, "Sequencer Generic", SPACE_SEQ, 0);
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
/* own keymap */
@@ -741,7 +765,7 @@ static void sequencer_buttons_region_init(wmWindowManager *wm, ARegion *ar)
{
wmKeyMap *keymap;
- keymap = WM_keymap_ensure(wm->defaultconf, "SequencerCommon", SPACE_SEQ, 0);
+ keymap = WM_keymap_ensure(wm->defaultconf, "Sequencer Generic", SPACE_SEQ, 0);
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
UI_panel_category_active_set_default(ar, "Strip");
@@ -833,7 +857,7 @@ void ED_spacetype_sequencer(void)
art->draw = sequencer_main_region_draw;
art->listener = sequencer_main_region_listener;
art->message_subscribe = sequencer_main_region_message_subscribe;
- art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_ANIMATION;
+ art->keymapflag = ED_KEYMAP_TOOL | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_ANIMATION;
BLI_addhead(&st->regiontypes, art);
@@ -843,7 +867,8 @@ void ED_spacetype_sequencer(void)
art->init = sequencer_preview_region_init;
art->draw = sequencer_preview_region_draw;
art->listener = sequencer_preview_region_listener;
- art->keymapflag = ED_KEYMAP_GIZMO | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_GPENCIL;
+ art->keymapflag = ED_KEYMAP_TOOL | ED_KEYMAP_GIZMO | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES |
+ ED_KEYMAP_GPENCIL;
BLI_addhead(&st->regiontypes, art);
/* regions: listview/buttons */
@@ -857,6 +882,17 @@ void ED_spacetype_sequencer(void)
BLI_addhead(&st->regiontypes, art);
sequencer_buttons_register(art);
+ /* regions: tool(bar) */
+ art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer tools region");
+ art->regionid = RGN_TYPE_TOOLS;
+ art->prefsizex = 58; /* XXX */
+ art->prefsizey = 50; /* XXX */
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
+ art->message_subscribe = ED_region_generic_tools_region_message_subscribe;
+ art->snap_size = ED_region_generic_tools_region_snap_size;
+ art->init = sequencer_tools_region_init;
+ art->draw = sequencer_tools_region_draw;
+ BLI_addhead(&st->regiontypes, art);
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region");
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index ef8b671116a..355779d678e 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3077,7 +3077,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
srna, "annotation_stroke_placement_sequencer_preview", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_seq_align");
RNA_def_property_enum_items(prop, annotation_stroke_placement_items);
- RNA_def_property_ui_text(prop, "Stroke Placement (Sequencer Preview)", "");
+ RNA_def_property_ui_text(prop, "Stroke Placement (Sequencer Editor)", "");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
/* Annotations - Image Editor Stroke Placement */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 6dc0cf045cd..c03a5cf308a 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -4400,7 +4400,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "SpaceSeq");
RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data");
- rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI));
+ rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_TOOLS));
/* view type, fairly important */
prop = RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c
index 6349b5206d6..c3dc74aa263 100644
--- a/source/blender/makesrna/intern/rna_workspace.c
+++ b/source/blender/makesrna/intern/rna_workspace.c
@@ -152,7 +152,15 @@ static bToolRef *rna_WorkSpace_tools_from_space_node(WorkSpace *workspace, bool
},
create);
}
-
+static bToolRef *rna_WorkSpace_tools_from_space_sequencer(WorkSpace *workspace, bool create)
+{
+ return rna_WorkSpace_tools_from_tkey(workspace,
+ &(bToolKey){
+ .space_type = SPACE_SEQ,
+ .mode = 0,
+ },
+ create);
+}
const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C),
PointerRNA *ptr,
PropertyRNA *UNUSED(prop),
@@ -332,6 +340,13 @@ static void rna_def_workspace_tools(BlenderRNA *brna, PropertyRNA *cprop)
/* return type */
parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
RNA_def_function_return(func, parm);
+ func = RNA_def_function(
+ srna, "from_space_sequencer", "rna_WorkSpace_tools_from_space_sequencer");
+ RNA_def_function_ui_description(func, "");
+ RNA_def_boolean(func, "create", false, "Create", "");
+ /* return type */
+ parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
+ RNA_def_function_return(func, parm);
}
static void rna_def_workspace(BlenderRNA *brna)
diff --git a/source/blender/windowmanager/WM_toolsystem.h b/source/blender/windowmanager/WM_toolsystem.h
index 5afa0a88560..8c045ef3af0 100644
--- a/source/blender/windowmanager/WM_toolsystem.h
+++ b/source/blender/windowmanager/WM_toolsystem.h
@@ -41,8 +41,8 @@ struct wmOperatorType;
/* wm_toolsystem.c */
-#define WM_TOOLSYSTEM_SPACE_MASK ((1 << SPACE_IMAGE) | (1 << SPACE_NODE) | (1 << SPACE_VIEW3D))
-
+#define WM_TOOLSYSTEM_SPACE_MASK \
+ ((1 << SPACE_IMAGE) | (1 << SPACE_NODE) | (1 << SPACE_VIEW3D) | (1 << SPACE_SEQ))
/* Values that define a categoey of active tool. */
typedef struct bToolKey {
int space_type;
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c
index 11286a822a7..59c372fdf66 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -468,6 +468,8 @@ static bool toolsystem_key_ensure_check(const bToolKey *tkey)
break;
case SPACE_NODE:
return true;
+ case SPACE_SEQ:
+ return true;
}
return false;
}
@@ -497,6 +499,11 @@ int WM_toolsystem_mode_from_spacetype(ViewLayer *view_layer, ScrArea *sa, int sp
mode = 0;
break;
}
+ case SPACE_SEQ: {
+ mode = 0;
+ break;
+ }
+
}
return mode;
}
@@ -705,6 +712,9 @@ static const char *toolsystem_default_tool(const bToolKey *tkey)
case SPACE_NODE: {
return "builtin.select_box";
}
+ case SPACE_SEQ: {
+ return "builtin.select_box";
+ }
}
return "builtin.select_box";

Event Timeline

@Eitan (EitanSomething) Hi, I was thinking about this diff today - I haven't looked at this yet, so I am not sure if this is ready or not.
My plan is to add new code like this as soon as possible in this release cycle.

Please, let me know what is status of this patch and if you need any help or cooperation.

I need a lot of help. I’m getting errors in the command prompt.Something along the lines of can’ Find built in.select_box etc

Ok, good to know.

Not that I am any wiser than you at this point, I will have to read some code to have better understanding. Though it's a bit abstract, but ok...

In this case it seems that you have errors, because you haven't registered keymaps in release\scripts\presets\keyconfig\keymap_data\blender_default.py
But I think that those are just warnings not critical errors(keymaps should be optional)

I would suggest looking at commit rB1944bca49a22, that is implementation from scratch.
Possibly re-implementing for sequencer by steps/bits can help.

If you want to continue working on this and have some problem just comment here I will try to help or perhaps find somebody in blender.chat
Or I can have a go at this during weekend.. Is up to you.

Thanks for help here.

You can have a go at this during the weekend

Just for info, I made some progress here, toolbar would be drawn, it has invalid coordinates however... I have to figure this out, then it should be ready.

Operators will also have to be modified to make this work as a whole.

Can you share a diff so I can update this?

Updated this paste. It was too late yesterday so I didn't.

tool selection works with shift+space

Will see if I can persuade actual panel to be drawn

Ok panel is drawn now.
Issue was, that toolbar region must not be the last element of regionbase... I don't know, what is the logic behind that.

If you tried to open any files with previous (Mon, Aug 5, 8:04 PM) version of this diff applied they wont work with new one, because that allocated toolbar at the end of the list.

@Eitan (EitanSomething) do you want to continue to work on this in any way?
I think that region should have overlap(transparent background), perhaps different alignment(top? - more space for more tools) and different toolset for preview/timeline, if that is easy to do.
Also tools(operators) themselves should be modified.

I think that region should have overlap(transparent background), perhaps different alignment(top? - more space for more tools)

No, for now the toolbar is always along the left.

and different toolset for preview/timeline, if that is easy to do.

Yes, this is needed for things like the Annotation tool, with which you would want to sketch on the viewer but not the timeline.

Also tools(operators) themselves should be modified.

Yes, that's the 2nd step - adding more tools and modifying existing ones to add Roll, Blade and other useful ones.

I will try to get Annotate to work in the Sequencer view

One more, because I forgot to include keymap.

Fixed issue where getting error message Sequencer Generic ...

Oh, this is great. The tools are working. For the first time is is possible to annotate properly in the Sequencer Preview. One thing to keep in mind when deciding on what tools should go in the toolbar, is that hot areas and changing the mouse pointer icon accordingly, can serve as information on current operator, in a way that can keep the clutter out of the toolbar.

In Dv R this is the very sparse toolbar:

But the number of tools in the toolbar can only be kept low thanks to hot areas, the changes in the mouse pointer icon and things being highlighted in the timeline(click to watch the gif):

IMO we can commit the toolbar to the Sequencer, even if it doesn't have very many tools yet. We can then add more from there.

IMO we can commit the toolbar to the Sequencer, even if it doesn't have very many tools yet. We can then add more from there.

That'd be great. I'd like to work on some kind of trim tool, something that's not implemented at all in the VSE yet, need the toolbar to develop it.