diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c index 59b1086e17e..a79dc05e09b 100644 --- a/source/blender/makesrna/intern/rna_workspace.c +++ b/source/blender/makesrna/intern/rna_workspace.c @@ -132,6 +132,12 @@ static bToolRef *rna_WorkSpace_tools_from_space_image_mode( return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_IMAGE, .mode = mode}, create); } +static bToolRef *rna_WorkSpace_tools_from_space_node( + WorkSpace *workspace, bool create) +{ + return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_NODE, .mode = 0}, create); +} + const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { @@ -301,6 +307,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_node", "rna_WorkSpace_tools_from_space_node"); + 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) |