Blender V5.0
anim_ops.cc File Reference
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include "BLI_listbase.h"
#include "BLI_math_base.h"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"
#include "DNA_scene_types.h"
#include "BKE_anim_data.hh"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_report.hh"
#include "BKE_scene.hh"
#include "BLT_translation.hh"
#include "UI_resources.hh"
#include "UI_view2d.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_anim_api.hh"
#include "ED_keyframes_keylist.hh"
#include "ED_markers.hh"
#include "ED_screen.hh"
#include "ED_sequencer.hh"
#include "ED_space_graph.hh"
#include "ED_time_scrub_ui.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "SEQ_iterator.hh"
#include "SEQ_retiming.hh"
#include "SEQ_sequencer.hh"
#include "SEQ_time.hh"
#include "ANIM_action.hh"
#include "ANIM_animdata.hh"
#include "anim_intern.hh"

Go to the source code of this file.

Classes

class  FrameChangeModalData
struct  SnapTarget

Functions

Frame Change Operator
static bool change_frame_poll (bContext *C)
static float get_snap_threshold (const ToolSettings *tool_settings, const ARegion *region)
static void ensure_change_frame_keylist (bContext *C, FrameChangeModalData &op_data)
static void append_keyframe_snap_target (bContext *C, FrameChangeModalData &op_data, const float timeline_frame, blender::Vector< SnapTarget > &r_targets)
static void append_marker_snap_target (Scene *scene, const float timeline_frame, blender::Vector< SnapTarget > &r_targets)
static void append_second_snap_target (Scene *scene, const float timeline_frame, const int step, blender::Vector< SnapTarget > &r_targets)
static void append_frame_snap_target (const Scene *scene, const float timeline_frame, const int step, blender::Vector< SnapTarget > &r_targets)
static void seq_frame_snap_update_best (const float position, const float timeline_frame, float *r_best_frame, float *r_best_distance)
static void append_sequencer_strip_snap_target (blender::Span< Strip * > strips, const Scene *scene, const float timeline_frame, blender::Vector< SnapTarget > &r_targets)
static void append_nla_strip_snap_target (bContext *C, const float timeline_frame, blender::Vector< SnapTarget > &r_targets)
static blender::Vector< SnapTargetseq_get_snap_targets (bContext *C, FrameChangeModalData &op_data, const float timeline_frame)
static blender::Vector< SnapTargetnla_get_snap_targets (bContext *C, const float timeline_frame)
static blender::Vector< SnapTargetaction_get_snap_targets (bContext *C, FrameChangeModalData &op_data, const float timeline_frame)
static blender::Vector< SnapTargetgraph_get_snap_targets (bContext *C, FrameChangeModalData &op_data, const float timeline_frame)
static float apply_frame_snap (bContext *C, FrameChangeModalData &op_data, const float frame)
static void change_frame_apply (bContext *C, wmOperator *op, const bool always_update)
static wmOperatorStatus change_frame_exec (bContext *C, wmOperator *op)
static float frame_from_event (bContext *C, const wmEvent *event)
static void change_frame_seq_preview_begin (bContext *C, const wmEvent *event, SpaceSeq *sseq)
static void change_frame_seq_preview_end (SpaceSeq *sseq)
static bool use_playhead_snapping (bContext *C)
static bool sequencer_skip_for_handle_tweak (const bContext *C, const wmEvent *event)
static wmOperatorStatus change_frame_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static bool need_extra_redraw_after_scrubbing_ends (bContext *C)
static void change_frame_cancel (bContext *C, wmOperator *op)
static wmOperatorStatus change_frame_modal (bContext *C, wmOperator *op, const wmEvent *event)
static std::string change_frame_get_name (wmOperatorType *, PointerRNA *ptr)
static void ANIM_OT_change_frame (wmOperatorType *ot)
Start/End Frame Operators
static bool anim_set_end_frames_poll (bContext *C)
static wmOperatorStatus anim_set_sfra_exec (bContext *C, wmOperator *op)
static void ANIM_OT_start_frame_set (wmOperatorType *ot)
static wmOperatorStatus anim_set_efra_exec (bContext *C, wmOperator *op)
static void ANIM_OT_end_frame_set (wmOperatorType *ot)
Set Preview Range Operator
static wmOperatorStatus previewrange_define_exec (bContext *C, wmOperator *op)
static void ANIM_OT_previewrange_set (wmOperatorType *ot)
Clear Preview Range Operator
static wmOperatorStatus previewrange_clear_exec (bContext *C, wmOperator *)
static void ANIM_OT_previewrange_clear (wmOperatorType *ot)
Debug operator: channel list
static wmOperatorStatus debug_channel_list_exec (bContext *C, wmOperator *)
static void ANIM_OT_debug_channel_list (wmOperatorType *ot)
Frame Scene/Preview Range Operator
static wmOperatorStatus scene_range_frame_exec (bContext *C, wmOperator *)
static void ANIM_OT_scene_range_frame (wmOperatorType *ot)
Conversion
static wmOperatorStatus convert_action_exec (bContext *C, wmOperator *)
static bool convert_action_poll (bContext *C)
static void ANIM_OT_convert_legacy_action (wmOperatorType *ot)
static bool merge_actions_selection_poll (bContext *C)
static wmOperatorStatus merge_actions_selection_exec (bContext *C, wmOperator *op)
static void ANIM_OT_merge_animation (wmOperatorType *ot)
Registration
void ED_operatortypes_anim ()
void ED_keymap_anim (wmKeyConfig *keyconf)

Function Documentation

◆ action_get_snap_targets()

◆ ANIM_OT_change_frame()

◆ ANIM_OT_convert_legacy_action()

void ANIM_OT_convert_legacy_action ( wmOperatorType * ot)
static

Definition at line 1271 of file anim_ops.cc.

References convert_action_exec(), convert_action_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.

Referenced by ED_operatortypes_anim().

◆ ANIM_OT_debug_channel_list()

void ANIM_OT_debug_channel_list ( wmOperatorType * ot)
static

◆ ANIM_OT_end_frame_set()

void ANIM_OT_end_frame_set ( wmOperatorType * ot)
static

◆ ANIM_OT_merge_animation()

void ANIM_OT_merge_animation ( wmOperatorType * ot)
static

◆ ANIM_OT_previewrange_clear()

void ANIM_OT_previewrange_clear ( wmOperatorType * ot)
static

◆ ANIM_OT_previewrange_set()

◆ ANIM_OT_scene_range_frame()

void ANIM_OT_scene_range_frame ( wmOperatorType * ot)
static

◆ ANIM_OT_start_frame_set()

void ANIM_OT_start_frame_set ( wmOperatorType * ot)
static

◆ anim_set_efra_exec()

◆ anim_set_end_frames_poll()

bool anim_set_end_frames_poll ( bContext * C)
static

◆ anim_set_sfra_exec()

◆ append_frame_snap_target()

void append_frame_snap_target ( const Scene * scene,
const float timeline_frame,
const int step,
blender::Vector< SnapTarget > & r_targets )
static

◆ append_keyframe_snap_target()

◆ append_marker_snap_target()

◆ append_nla_strip_snap_target()

◆ append_second_snap_target()

void append_second_snap_target ( Scene * scene,
const float timeline_frame,
const int step,
blender::Vector< SnapTarget > & r_targets )
static

◆ append_sequencer_strip_snap_target()

void append_sequencer_strip_snap_target ( blender::Span< Strip * > strips,
const Scene * scene,
const float timeline_frame,
blender::Vector< SnapTarget > & r_targets )
static

◆ apply_frame_snap()

◆ change_frame_apply()

◆ change_frame_cancel()

◆ change_frame_exec()

wmOperatorStatus change_frame_exec ( bContext * C,
wmOperator * op )
static

◆ change_frame_get_name()

std::string change_frame_get_name ( wmOperatorType * ,
PointerRNA * ptr )
static

Definition at line 826 of file anim_ops.cc.

References BLT_I18NCONTEXT_OPERATOR_DEFAULT, CTX_IFACE_, ptr, and RNA_boolean_get().

Referenced by ANIM_OT_change_frame().

◆ change_frame_invoke()

◆ change_frame_modal()

◆ change_frame_poll()

◆ change_frame_seq_preview_begin()

void change_frame_seq_preview_begin ( bContext * C,
const wmEvent * event,
SpaceSeq * sseq )
static

◆ change_frame_seq_preview_end()

void change_frame_seq_preview_end ( SpaceSeq * sseq)
static

◆ convert_action_exec()

◆ convert_action_poll()

bool convert_action_poll ( bContext * C)
static

◆ debug_channel_list_exec()

◆ ED_keymap_anim()

void ED_keymap_anim ( wmKeyConfig * keyconf)

Definition at line 1452 of file anim_ops.cc.

References RGN_TYPE_WINDOW, SPACE_EMPTY, and WM_keymap_ensure().

Referenced by ED_spacetypes_keymap().

◆ ED_operatortypes_anim()

◆ ensure_change_frame_keylist()

◆ frame_from_event()

◆ get_snap_threshold()

float get_snap_threshold ( const ToolSettings * tool_settings,
const ARegion * region )
static

◆ graph_get_snap_targets()

◆ merge_actions_selection_exec()

◆ merge_actions_selection_poll()

bool merge_actions_selection_poll ( bContext * C)
static

◆ need_extra_redraw_after_scrubbing_ends()

bool need_extra_redraw_after_scrubbing_ends ( bContext * C)
static

◆ nla_get_snap_targets()

◆ previewrange_clear_exec()

◆ previewrange_define_exec()

◆ scene_range_frame_exec()

◆ seq_frame_snap_update_best()

void seq_frame_snap_update_best ( const float position,
const float timeline_frame,
float * r_best_frame,
float * r_best_distance )
static

Definition at line 277 of file anim_ops.cc.

References abs.

Referenced by append_sequencer_strip_snap_target().

◆ seq_get_snap_targets()

◆ sequencer_skip_for_handle_tweak()

◆ use_playhead_snapping()