Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyframing.c
| Show First 20 Lines • Show All 1,962 Lines • ▼ Show 20 Lines | static int insert_key_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | ||||
| /* if prompting or no active Keying Set, show the menu */ | /* if prompting or no active Keying Set, show the menu */ | ||||
| if ((scene->active_keyingset == 0) || RNA_boolean_get(op->ptr, "always_prompt")) { | if ((scene->active_keyingset == 0) || RNA_boolean_get(op->ptr, "always_prompt")) { | ||||
| uiPopupMenu *pup; | uiPopupMenu *pup; | ||||
| uiLayout *layout; | uiLayout *layout; | ||||
| /* call the menu, which will call this operator again, hence the canceled */ | /* call the menu, which will call this operator again, hence the canceled */ | ||||
| pup = UI_popup_menu_begin(C, WM_operatortype_name(op->type, op->ptr), ICON_NONE); | pup = UI_popup_menu_begin(C, WM_operatortype_name(op->type, op->ptr), ICON_NONE); | ||||
| layout = UI_popup_menu_layout(pup); | layout = UI_popup_menu_layout(pup); | ||||
| uiItemsEnumO(layout, "ANIM_OT_keyframe_insert_menu", "type"); | uiItemsEnumO(layout, "ANIM_OT_keyframe_insert_menu", "type", false); | ||||
| UI_popup_menu_end(C, pup); | UI_popup_menu_end(C, pup); | ||||
| return OPERATOR_INTERFACE; | return OPERATOR_INTERFACE; | ||||
| } | } | ||||
| /* just call the exec() on the active keyingset */ | /* just call the exec() on the active keyingset */ | ||||
| RNA_enum_set(op->ptr, "type", 0); | RNA_enum_set(op->ptr, "type", 0); | ||||
| RNA_boolean_set(op->ptr, "confirm_success", true); | RNA_boolean_set(op->ptr, "confirm_success", true); | ||||
| ▲ Show 20 Lines • Show All 1,142 Lines • Show Last 20 Lines | |||||