Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_clip/clip_ops.c
| Show First 20 Lines • Show All 1,834 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Toggle Lock To Selection Operator | /** \name Toggle Lock To Selection Operator | ||||
| * \{ */ | * \{ */ | ||||
| static int lock_selection_togglee_exec(bContext *C, wmOperator *UNUSED(op)) | static int lock_selection_togglee_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| SpaceClip *space_clip = CTX_wm_space_clip(C); | SpaceClip *space_clip = CTX_wm_space_clip(C); | ||||
| ClipViewLockState lock_state; | |||||
| ED_clip_view_lock_state_store(C, &lock_state); | |||||
| space_clip->flag ^= SC_LOCK_SELECTION; | space_clip->flag ^= SC_LOCK_SELECTION; | ||||
| ED_clip_view_lock_state_restore_no_jump(C, &lock_state); | |||||
| WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CLIP, NULL); | WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CLIP, NULL); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void CLIP_OT_lock_selection_toggle(wmOperatorType *ot) | void CLIP_OT_lock_selection_toggle(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Toggle Lock Selection"; | ot->name = "Toggle Lock Selection"; | ||||
| ot->description = "Toggle Lock Selection option of the current clip editor"; | ot->description = "Toggle Lock Selection option of the current clip editor"; | ||||
| Show All 40 Lines | |||||