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/makesrna/intern/rna_workspace.c
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/makesrna/intern/rna_workspace.c')
-rw-r--r--source/blender/makesrna/intern/rna_workspace.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c
index 4d4ab64abb9..32e348ea72f 100644
--- a/source/blender/makesrna/intern/rna_workspace.c
+++ b/source/blender/makesrna/intern/rna_workspace.c
@@ -152,7 +152,17 @@ static bToolRef *rna_WorkSpace_tools_from_space_node(WorkSpace *workspace, bool
},
create);
}
-
+static bToolRef *rna_WorkSpace_tools_from_space_sequencer(WorkSpace *workspace,
+ int mode,
+ bool create)
+{
+ return rna_WorkSpace_tools_from_tkey(workspace,
+ &(bToolKey){
+ .space_type = SPACE_SEQ,
+ .mode = mode,
+ },
+ create);
+}
const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C),
PointerRNA *ptr,
PropertyRNA *UNUSED(prop),
@@ -164,6 +174,8 @@ const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C),
return rna_enum_context_mode_items;
case SPACE_IMAGE:
return rna_enum_space_image_mode_all_items;
+ case SPACE_SEQ:
+ return rna_enum_space_sequencer_view_type_items;
}
return DummyRNA_DEFAULT_items;
}
@@ -335,6 +347,16 @@ 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, "");
+ parm = RNA_def_enum(func, "mode", rna_enum_space_sequencer_view_type_items, 0, "", "");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ 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)