diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm_api.c | 4 |
2 files changed, 1 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index dd338713d3e..09451599ce5 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1042,15 +1042,13 @@ static void operator_draw(bContext *C, wmOperator *op) } /* same as exec(), but call cancel */ -static int operator_cancel(bContext *C, wmOperator *op) +static void operator_cancel(bContext *C, wmOperator *op) { extern FunctionRNA rna_Operator_cancel_func; PointerRNA opr; ParameterList list; FunctionRNA *func; - void *ret; - int result; RNA_pointer_create(NULL, op->type->ext.srna, op, &opr); func = &rna_Operator_cancel_func; /* RNA_struct_find_function(&opr, "cancel"); */ @@ -1059,12 +1057,7 @@ static int operator_cancel(bContext *C, wmOperator *op) RNA_parameter_set_lookup(&list, "context", &C); op->type->ext.call(C, &opr, func, &list); - RNA_parameter_get_lookup(&list, "result", &ret); - result = *(int *)ret; - RNA_parameter_list_free(&list); - - return result; } void operator_wrapper(wmOperatorType *ot, void *userdata); diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index eb84bb61e1f..91cddd28be0 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -539,10 +539,6 @@ void RNA_api_operator(StructRNA *srna) RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL | FUNC_ALLOW_WRITE); parm = RNA_def_pointer(func, "context", "Context", "", ""); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - - /* better name? */ - parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); - RNA_def_function_return(func, parm); } void RNA_api_macro(StructRNA *srna) |