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:
authorCampbell Barton <ideasman42@gmail.com>2018-10-02 08:28:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-02 08:28:14 +0300
commit0e7a592c3c16bfb77ca9410a49d00d416406bdec (patch)
tree9e7f3d37d8b0a01b31b9093bf1785fbf7aad8c5b /source/blender/makesrna/intern/rna_workspace_api.c
parent5db328c063cb196b17cafb05558c39baee675fde (diff)
WM: report error w/ unknown operator name
Diffstat (limited to 'source/blender/makesrna/intern/rna_workspace_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_workspace_api.c5
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 */