Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2020-01-22 16:54:44 +0300
committerRichard Antalik <richardantalik@gmail.com>2020-01-22 17:06:18 +0300
commit6a49161c8c60cb63d9e3ed8dbe700163ff858436 (patch)
tree501c050d13bdbcdff7c6152a0946bb99617d5dc5 /source/blender/windowmanager
parentf559e3977e0773382cfb554956fe424f6050d495 (diff)
VSE: Tool system integration
Add toolbar to sequencer regions. A bit of refactoring has to be done in RNA space. Currently there is only cut tool implemented to serve as template for anybody who would like to add more.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_toolsystem.h4
-rw-r--r--source/blender/windowmanager/intern/wm_toolsystem.c18
2 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/windowmanager/WM_toolsystem.h b/source/blender/windowmanager/WM_toolsystem.h
index 620150ba14f..36cb5be7547 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 3218f8c45e4..8e49e47c492 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -487,6 +487,8 @@ static bool toolsystem_key_ensure_check(const bToolKey *tkey)
break;
case SPACE_NODE:
return true;
+ case SPACE_SEQ:
+ return true;
}
return false;
}
@@ -516,6 +518,11 @@ int WM_toolsystem_mode_from_spacetype(ViewLayer *view_layer, ScrArea *sa, int sp
mode = 0;
break;
}
+ case SPACE_SEQ: {
+ SpaceSeq *sseq = sa->spacedata.first;
+ mode = sseq->view;
+ break;
+ }
}
return mode;
}
@@ -736,6 +743,17 @@ static const char *toolsystem_default_tool(const bToolKey *tkey)
case SPACE_NODE: {
return "builtin.select_box";
}
+ case SPACE_SEQ: {
+ switch (tkey->mode) {
+ case SEQ_VIEW_SEQUENCE:
+ return "builtin.select";
+ case SEQ_VIEW_PREVIEW:
+ return "builtin.annotate";
+ case SEQ_VIEW_SEQUENCE_PREVIEW:
+ return "builtin.select";
+ }
+ return "builtin.select_box";
+ }
}
return "builtin.select_box";