Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/pose_lib.c
| Show First 20 Lines • Show All 392 Lines • ▼ Show 20 Lines | static void poselib_add_menu_invoke__replacemenu(bContext *C, uiLayout *layout, void *UNUSED(arg)) | ||||
| wmOperatorType *ot = WM_operatortype_find("POSELIB_OT_pose_add", 1); | wmOperatorType *ot = WM_operatortype_find("POSELIB_OT_pose_add", 1); | ||||
| BLI_assert(ot != NULL); | BLI_assert(ot != NULL); | ||||
| /* set the operator execution context correctly */ | /* set the operator execution context correctly */ | ||||
| uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); | uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); | ||||
| UI_block_flag_enable(uiLayoutGetBlock(layout), UI_BLOCK_IS_FLIP); | |||||
| /* add each marker to this menu */ | /* add each marker to this menu */ | ||||
| for (marker = act->markers.first; marker; marker = marker->next) { | for (marker = act->markers.first; marker; marker = marker->next) { | ||||
| PointerRNA props_ptr; | PointerRNA props_ptr; | ||||
| uiItemFullO_ptr( | uiItemFullO_ptr( | ||||
| layout, ot, marker->name, ICON_ARMATURE_DATA, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); | layout, ot, marker->name, ICON_ARMATURE_DATA, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr); | ||||
| RNA_int_set(&props_ptr, "frame", marker->frame); | RNA_int_set(&props_ptr, "frame", marker->frame); | ||||
| RNA_string_set(&props_ptr, "name", marker->name); | RNA_string_set(&props_ptr, "name", marker->name); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,476 Lines • Show Last 20 Lines | |||||