diff options
Diffstat (limited to 'source/blender')
24 files changed, 71 insertions, 57 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 7cd47fab83a..58db93b4586 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -503,8 +503,9 @@ static int ed_markers_opwrap_invoke_custom(bContext *C, wmOperator *op, const wm /* return status modifications - for now, make this spacetype dependent as above */ if (sa->spacetype != SPACE_TIME) { /* unless successful, must add "pass-through" to let normal operator's have a chance at tackling this event */ - if (retval != OPERATOR_FINISHED) + if ((retval & (OPERATOR_FINISHED | OPERATOR_INTERFACE)) == 0) { retval |= OPERATOR_PASS_THROUGH; + } } return retval; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 4c2d90179a7..c2fabfadc35 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1407,7 +1407,7 @@ static int insert_key_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UN uiItemsEnumO(layout, "ANIM_OT_keyframe_insert_menu", "type"); uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } else { /* just call the exec() on the active keyingset */ diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index ad2db0d9c66..8386eadf962 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -477,7 +477,7 @@ static int keyingset_active_menu_invoke(bContext *C, wmOperator *op, const wmEve uiItemsEnumO(layout, "ANIM_OT_keying_set_active_set", "type"); uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } static int keyingset_active_menu_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 75fa4a5433f..22187682265 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -693,7 +693,7 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } void ARMATURE_OT_parent_set(wmOperatorType *ot) diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c index 50d9d300d15..4667e09360f 100644 --- a/source/blender/editors/armature/pose_group.c +++ b/source/blender/editors/armature/pose_group.c @@ -162,7 +162,7 @@ static int pose_groups_menu_invoke(bContext *C, wmOperator *op, const wmEvent *U /* finish building the menu, and process it (should result in calling self again) */ uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } else { /* just use the active group index, and call the exec callback for the calling operator */ diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 0609fcc29e8..8bb1c586526 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -423,7 +423,7 @@ static int poselib_add_menu_invoke(bContext *C, wmOperator *op, const wmEvent *U uiPupMenuEnd(C, pup); /* this operator is only for a menu, not used further */ - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index a52b2a619dc..eed059b1aef 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -5386,7 +5386,7 @@ static int toggle_cyclic_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS layout = uiPupMenuLayout(pup); uiItemsEnumO(layout, op->type->idname, "direction"); uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } } } diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index bc794bf3350..3704315bb61 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -359,15 +359,15 @@ void uiPupMenuEnd(struct bContext *C, struct uiPopupMenu *head); struct uiLayout *uiPupMenuLayout(uiPopupMenu *head); void uiPupMenuReports(struct bContext *C, struct ReportList *reports) ATTR_NONNULL(); -bool uiPupMenuInvoke(struct bContext *C, const char *idname, struct ReportList *reports) ATTR_NONNULL(1, 2); +int uiPupMenuInvoke(struct bContext *C, const char *idname, struct ReportList *reports) ATTR_NONNULL(1, 2); /* Pie menus */ typedef struct uiPieMenu uiPieMenu; -void uiPieMenuInvoke(struct bContext *C, const char *idname, const struct wmEvent *event); -void uiPieOperatorEnumInvoke(struct bContext *C, const char *title, const char *opname, +int uiPieMenuInvoke(struct bContext *C, const char *idname, const struct wmEvent *event); +int uiPieOperatorEnumInvoke(struct bContext *C, const char *title, const char *opname, const char *propname, const struct wmEvent *event); -void uiPieEnumInvoke(struct bContext *C, const char *title, const char *path, const struct wmEvent *event); +int uiPieEnumInvoke(struct bContext *C, const char *title, const char *path, const struct wmEvent *event); struct uiPieMenu *uiPieMenuBegin(struct bContext *C, const char *title, int icon, const struct wmEvent *event) ATTR_NONNULL(); void uiPieMenuEnd(struct bContext *C, uiPieMenu *pie); diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 1574ceace8a..db893896f89 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -2794,7 +2794,7 @@ uiLayout *uiPieMenuLayout(uiPieMenu *pie) return pie->layout; } -void uiPieMenuInvoke(struct bContext *C, const char *idname, const wmEvent *event) +int uiPieMenuInvoke(struct bContext *C, const char *idname, const wmEvent *event) { uiPieMenu *pie; uiLayout *layout; @@ -2803,11 +2803,11 @@ void uiPieMenuInvoke(struct bContext *C, const char *idname, const wmEvent *even if (mt == NULL) { printf("%s: named menu \"%s\" not found\n", __func__, idname); - return; + return OPERATOR_CANCELLED; } if (mt->poll && mt->poll(C, mt) == 0) - return; + return OPERATOR_CANCELLED; pie = uiPieMenuBegin(C, IFACE_(mt->label), ICON_NONE, event); layout = uiPieMenuLayout(pie); @@ -2822,10 +2822,12 @@ void uiPieMenuInvoke(struct bContext *C, const char *idname, const wmEvent *even mt->draw(C, &menu); uiPieMenuEnd(C, pie); + + return OPERATOR_INTERFACE; } -void uiPieOperatorEnumInvoke(struct bContext *C, const char *title, const char *opname, - const char *propname, const wmEvent *event) +int uiPieOperatorEnumInvoke(struct bContext *C, const char *title, const char *opname, + const char *propname, const wmEvent *event) { uiPieMenu *pie; uiLayout *layout; @@ -2837,10 +2839,12 @@ void uiPieOperatorEnumInvoke(struct bContext *C, const char *title, const char * uiItemsEnumO(layout, opname, propname); uiPieMenuEnd(C, pie); + + return OPERATOR_INTERFACE; } -void uiPieEnumInvoke(struct bContext *C, const char *title, const char *path, - const wmEvent *event) +int uiPieEnumInvoke(struct bContext *C, const char *title, const char *path, + const wmEvent *event) { PointerRNA ctx_ptr; PointerRNA r_ptr; @@ -2851,13 +2855,13 @@ void uiPieEnumInvoke(struct bContext *C, const char *title, const char *path, RNA_pointer_create(NULL, &RNA_Context, C, &ctx_ptr); if (!RNA_path_resolve(&ctx_ptr, path, &r_ptr, &r_prop)) { - return; + return OPERATOR_CANCELLED; } /* invalid property, only accept enums */ if (RNA_property_type(r_prop) != PROP_ENUM) { BLI_assert(0); - return; + return OPERATOR_CANCELLED; } pie = uiPieMenuBegin(C, IFACE_(title), ICON_NONE, event); @@ -2868,6 +2872,8 @@ void uiPieEnumInvoke(struct bContext *C, const char *title, const char *path, uiItemFullR(layout, &r_ptr, r_prop, RNA_NO_INDEX, 0, UI_ITEM_R_EXPAND, NULL, 0); uiPieMenuEnd(C, pie); + + return OPERATOR_INTERFACE; } @@ -2922,7 +2928,7 @@ void uiPupMenuReports(bContext *C, ReportList *reports) } } -bool uiPupMenuInvoke(bContext *C, const char *idname, ReportList *reports) +int uiPupMenuInvoke(bContext *C, const char *idname, ReportList *reports) { uiPopupMenu *pup; uiLayout *layout; @@ -2931,11 +2937,11 @@ bool uiPupMenuInvoke(bContext *C, const char *idname, ReportList *reports) if (mt == NULL) { BKE_reportf(reports, RPT_ERROR, "Menu \"%s\" not found", idname); - return false; + return OPERATOR_CANCELLED; } if (mt->poll && mt->poll(C, mt) == 0) - return false; + return OPERATOR_CANCELLED; pup = uiPupMenuBegin(C, IFACE_(mt->label), ICON_NONE); layout = uiPupMenuLayout(pup); @@ -2951,7 +2957,7 @@ bool uiPupMenuInvoke(bContext *C, const char *idname, ReportList *reports) uiPupMenuEnd(C, pup); - return true; + return OPERATOR_INTERFACE; } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 92ed84b7f5e..7c11b3e9879 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1911,7 +1911,7 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED /* finish building the menu, and process it (should result in calling self again) */ uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } /* call constraint_add_exec() to add the IK constraint */ diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 8f74278b424..798334ba2a7 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -309,14 +309,16 @@ static int make_proxy_invoke(bContext *C, wmOperator *op, const wmEvent *event) /* present the menu and be done... */ uiPupMenuEnd(C, pup); + + /* this invoke just calls another instance of this operator... */ + return OPERATOR_INTERFACE; } else { /* error.. cannot continue */ BKE_report(op->reports, RPT_ERROR, "Can only make proxy for a referenced object or group"); + return OPERATOR_CANCELLED; } - /* this invoke just calls another instance of this operator... */ - return OPERATOR_CANCELLED; } static int make_proxy_exec(bContext *C, wmOperator *op) @@ -923,7 +925,7 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } static bool parent_set_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index a4a7580c058..8d9371ef852 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2759,7 +2759,7 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, const wmEvent uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } static void SCREEN_OT_area_options(wmOperatorType *ot) @@ -2866,7 +2866,7 @@ static int repeat_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNU uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } static int repeat_history_exec(bContext *C, wmOperator *op) @@ -3262,7 +3262,7 @@ static int header_toolbox_invoke(bContext *C, wmOperator *UNUSED(op), const wmEv uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } static void SCREEN_OT_header_toolbox(wmOperatorType *ot) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 0e0012c198f..2e4c9a32607 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4738,7 +4738,7 @@ static int dyntopo_warning_popup(bContext *C, wmOperatorType *ot, bool vdata, bo uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index b651d684bf6..a62ec1b31e1 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -77,7 +77,7 @@ static int toolbox_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UN uiItemsEnumR(layout, &ptr, "align"); uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } void BUTTONS_OT_toolbox(wmOperatorType *ot) diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index df556f94f28..b51897d1c5d 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2256,7 +2256,7 @@ static int image_pack_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( BKE_image_release_ibuf(ima, ibuf, NULL); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } BKE_image_release_ibuf(ima, ibuf, NULL); diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 25fa31407ff..405c1f0a961 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -261,7 +261,7 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } void FILE_OT_unpack_all(wmOperatorType *ot) @@ -330,7 +330,7 @@ static int unpack_item_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } void FILE_OT_unpack_item(wmOperatorType *ot) diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index c787177a62a..fe0431b9618 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -2194,7 +2194,7 @@ static int nla_fmodifier_add_invoke(bContext *C, wmOperator *UNUSED(op), const w uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } static int nla_fmodifier_add_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index 96cc7fb4407..434d92d6531 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -571,7 +571,7 @@ static int node_group_separate_invoke(bContext *C, wmOperator *UNUSED(op), const uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } void NODE_OT_group_separate(wmOperatorType *ot) diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index ef621407abd..1ec41ac6df8 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -1617,7 +1617,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event) uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } } else { diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 852edaac7dc..3b3c86d6c06 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -3173,7 +3173,7 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, const wmEve break; } - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } void TEXT_OT_resolve_conflict(wmOperatorType *ot) diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 81e065ee33a..05a147fe0d4 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -176,7 +176,7 @@ static int select_orientation_invoke(bContext *C, wmOperator *UNUSED(op), const uiItemsEnumO(layout, "TRANSFORM_OT_select_orientation", "orientation"); uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 4cf6bfe9a8f..73a70b48712 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -352,13 +352,22 @@ enum { OPERATOR_RUNNING_MODAL = (1 << 0), OPERATOR_CANCELLED = (1 << 1), OPERATOR_FINISHED = (1 << 2), -/* add this flag if the event should pass through */ + /* add this flag if the event should pass through */ OPERATOR_PASS_THROUGH = (1 << 3), -/* in case operator got executed outside WM code... like via fileselect */ + /* in case operator got executed outside WM code... like via fileselect */ OPERATOR_HANDLED = (1 << 4), + /* used for operators that act indirectly (eg. popup menu) + * note: this isn't great design (using operators to trigger UI) avoid where possible. */ + OPERATOR_INTERFACE = (1 << 5), }; -#define OPERATOR_FLAGS_ALL (OPERATOR_RUNNING_MODAL | OPERATOR_CANCELLED | OPERATOR_FINISHED | \ - OPERATOR_PASS_THROUGH | OPERATOR_HANDLED) +#define OPERATOR_FLAGS_ALL ( \ + OPERATOR_RUNNING_MODAL | \ + OPERATOR_CANCELLED | \ + OPERATOR_FINISHED | \ + OPERATOR_PASS_THROUGH | \ + OPERATOR_HANDLED | \ + OPERATOR_INTERFACE | \ + 0) /* sanity checks for debug mode only */ #define OPERATOR_RETVAL_CHECK(ret) (void)ret, BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret) diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 7513a687978..3c39308e7dc 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -429,6 +429,7 @@ EnumPropertyItem operator_return_items[] = { {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"}, /* used as a flag */ {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, + {OPERATOR_INTERFACE, "INTERFACE", 0, "Interface", "Handled but not executed (popup menus)"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 154249a2294..3b0fa042f36 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1079,6 +1079,7 @@ int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN); uiItemsFullEnumO(layout, op->type->idname, RNA_property_identifier(prop), op->ptr->data, WM_OP_EXEC_REGION_WIN, 0); uiPupMenuEnd(C, pup); + return OPERATOR_INTERFACE; } return OPERATOR_CANCELLED; @@ -1123,7 +1124,7 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op) int WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { uiPupBlock(C, wm_enum_search_menu, op); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } /* Can't be used as an invoke directly, needs message arg (can be NULL) */ @@ -1145,7 +1146,7 @@ int WM_operator_confirm_message_ex(bContext *C, wmOperator *op, uiItemFullO_ptr(layout, op->type, message, ICON_NONE, properties, WM_OP_EXEC_REGION_WIN, 0); uiPupMenuEnd(C, pup); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } int WM_operator_confirm_message(bContext *C, wmOperator *op, const char *message) @@ -2018,7 +2019,7 @@ static int wm_search_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNU { uiPupBlock(C, wm_block_search_menu, op); - return OPERATOR_CANCELLED; + return OPERATOR_INTERFACE; } /* op->poll */ @@ -2057,9 +2058,7 @@ static int wm_call_menu_exec(bContext *C, wmOperator *op) char idname[BKE_ST_MAXNAME]; RNA_string_get(op->ptr, "name", idname); - uiPupMenuInvoke(C, idname, op->reports); - - return OPERATOR_CANCELLED; + return uiPupMenuInvoke(C, idname, op->reports); } static void WM_OT_call_menu(wmOperatorType *ot) @@ -2081,9 +2080,7 @@ static int wm_call_pie_menu_invoke(bContext *C, wmOperator *op, const wmEvent *e char idname[BKE_ST_MAXNAME]; RNA_string_get(op->ptr, "name", idname); - uiPieMenuInvoke(C, idname, event); - - return OPERATOR_CANCELLED; + return uiPieMenuInvoke(C, idname, event); } static int wm_call_pie_menu_exec(bContext *C, wmOperator *op) @@ -2091,9 +2088,7 @@ static int wm_call_pie_menu_exec(bContext *C, wmOperator *op) char idname[BKE_ST_MAXNAME]; RNA_string_get(op->ptr, "name", idname); - uiPieMenuInvoke(C, idname, CTX_wm_window(C)->eventstate); - - return OPERATOR_CANCELLED; + return uiPieMenuInvoke(C, idname, CTX_wm_window(C)->eventstate); } static void WM_OT_call_menu_pie(wmOperatorType *ot) |