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 /release/scripts/startup/bl_ui/space_toolsystem_common.py
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 'release/scripts/startup/bl_ui/space_toolsystem_common.py')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_common.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 05785b85dfc..4dc724299f0 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -390,6 +390,14 @@ class ToolSelectPanelHelper:
if tool is not None:
tool.refresh_from_context()
return tool
+ elif space_type == 'SEQUENCE_EDITOR':
+ space_data = context.space_data
+ if mode is None:
+ mode = space_data.view_type
+ tool = context.workspace.tools.from_space_sequencer(mode, create=create)
+ if tool is not None:
+ tool.refresh_from_context()
+ return tool
return None
@staticmethod
@@ -656,6 +664,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, context.space_data.view_type
else:
return None, None