diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace_api.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace_api.c b/source/blender/makesrna/intern/rna_workspace_api.c index aac38d05cd8..78e617450e8 100644 --- a/source/blender/makesrna/intern/rna_workspace_api.c +++ b/source/blender/makesrna/intern/rna_workspace_api.c @@ -117,6 +117,7 @@ static void rna_WorkspaceTool_refresh_from_context( static PointerRNA rna_WorkspaceTool_operator_properties( bToolRef *tref, + ReportList *reports, const char *idname) { wmOperatorType *ot = WM_operatortype_find(idname, true); @@ -126,6 +127,9 @@ static PointerRNA rna_WorkspaceTool_operator_properties( WM_toolsystem_ref_properties_ensure(tref, ot, &ptr); return ptr; } + else { + BKE_reportf(reports, RPT_ERROR, "Operator '%s' not found!", idname); + } return PointerRNA_NULL; } @@ -164,6 +168,7 @@ void RNA_api_workspace_tool(StructRNA *srna) /* Access tool operator options (optionally create). */ func = RNA_def_function(srna, "operator_properties", "rna_WorkspaceTool_operator_properties"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "operator", NULL, 0, "", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); /* return */ |