Blender V5.3
keyframes_general.cc File Reference
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <variant>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_string.hh"
#include "BLI_string_utils.hh"
#include "BLI_utildefines.hh"
#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "BKE_action.hh"
#include "BKE_curve.hh"
#include "BKE_fcurve.hh"
#include "BKE_main.hh"
#include "BKE_scene.hh"
#include "RNA_access.hh"
#include "RNA_enum_types.hh"
#include "RNA_path.hh"
#include "ED_keyframes_edit.hh"
#include "ANIM_action.hh"
#include "ANIM_animdata.hh"
#include "ANIM_fcurve.hh"
#include "keyframes_general_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ButterworthCoefficients
struct  blender::tSmooth_Bezt

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::ed
namespace  blender::ed::animation

Typedefs

using blender::ed::animation::pastebuf_match_func

Functions

std::optional< std::string > blender::ed::animation::flip_names (const StringRefNull rna_path)
static SlotMatchMethod blender::ed::animation::get_slot_match_method (const bool from_single, const bool to_single, const KeyframePasteContext &paste_context)
static const FCurve * blender::ed::animation::pastebuf_find_matching_copybuf_item (const pastebuf_match_func strategy, Main *bmain, const bAnimListElem &ale_to_paste_into, const bool from_single, const bool to_single, const KeyframePasteContext &paste_context)
bool blender::ed::animation::pastebuf_match_path_full (Main *, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, animrig::slot_handle_t, const bool from_single, const bool to_single, const bool flip)
bool blender::ed::animation::pastebuf_match_path_property_and_component_length (Main *bmain, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, const animrig::slot_handle_t slot_handle_in_copy_buffer, const bool from_single, const bool to_single, const bool flip)
bool blender::ed::animation::pastebuf_match_path_property (Main *, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, animrig::slot_handle_t, const bool from_single, const bool, const bool)
bool blender::ed::animation::pastebuf_match_index_only (Main *, const FCurve &fcurve_to_match, const FCurve &fcurve_in_copy_buffer, animrig::slot_handle_t, const bool from_single, const bool, const bool)
static void blender::ed::animation::do_curve_mirror_flippping (const FCurve &fcurve, BezTriple &bezt)
static void blender::ed::animation::paste_animedit_keys_fcurve (FCurve *fcu, const FCurve &fcurve_in_copy_buffer, float offset[2], const eKeyMergeMode merge_mode, bool flip)
Duplicate Keys
bool blender::duplicate_fcurve_keys (FCurve *fcu)
Various Tools
void blender::clean_fcurve (bAnimListElem *ale, float thresh, bool cleardefault, const bool only_selected_keys)
static bool blender::find_fcurve_segment (FCurve *fcu, const int start_index, int *r_segment_start_idx, int *r_segment_len)
ListBaseT< FCurveSegment > blender::find_fcurve_segments (FCurve *fcu)
static const BezTriple * blender::fcurve_segment_start_get (FCurve *fcu, int index)
static const BezTriple * blender::fcurve_segment_end_get (FCurve *fcu, int index)
void blender::blend_to_neighbor_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor)
float blender::get_default_rna_value (const FCurve *fcu, PropertyRNA *prop, PointerRNA *ptr)
void blender::blend_to_default_fcurve (PointerRNA *id_ptr, FCurve *fcu, const float factor)
void blender::scale_average_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor)
ButterworthCoefficients * blender::ED_anim_allocate_butterworth_coefficients (const int filter_order)
void blender::ED_anim_free_butterworth_coefficients (ButterworthCoefficients *bw_coeff)
void blender::ED_anim_calculate_butterworth_coefficients (const float cutoff_frequency, const float sampling_frequency, ButterworthCoefficients *bw_coeff)
static double blender::butterworth_filter_value (double x, double *w0, double *w1, double *w2, ButterworthCoefficients *bw_coeff)
static float blender::butterworth_calculate_blend_value (float *samples, const float *filtered_values, const int start_index, const int end_index, const int sample_index, const int blend_in_out)
void blender::butterworth_smooth_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float *samples, const int sample_count, const float factor, const int blend_in_out, const int sample_rate, ButterworthCoefficients *bw_coeff)
void blender::ED_ANIM_get_1d_gauss_kernel (const float sigma, const int kernel_size, double *r_kernel)
void blender::smooth_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float *original_values, float *samples, const int sample_count, const float factor, const int kernel_size, const double *kernel)
static float blender::ease_sigmoid_function (const float x, const float width, const float shift)
void blender::ease_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor, const float width)
void blender::blend_offset_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor)
static float blender::s_curve (float x, float slope, float width, float height, float xshift, float yshift)
void blender::blend_to_ease_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor)
bool blender::match_slope_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor)
void blender::shear_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor, tShearDirection direction)
void blender::push_pull_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor)
void blender::time_offset_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float frame_offset)
void blender::scale_from_fcurve_segment_neighbor (FCurve *fcu, FCurveSegment *segment, const float factor, const FCurveSegmentAnchor anchor)
void blender::breakdown_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float factor)
FCurve Decimate
static bool blender::prepare_for_decimate (FCurve *fcu, int i)
static void blender::decimate_fcurve_segment (FCurve *fcu, int bezt_segment_start_idx, int bezt_segment_len, float remove_ratio, float error_sq_max)
bool blender::decimate_fcurve (bAnimListElem *ale, float remove_ratio, float error_sq_max)
FCurve Smooth
void blender::smooth_fcurve (FCurve *fcu)

Variables

KeyframeCopyBuffer * blender::ed::animation::keyframe_copy_buffer = nullptr

Copy/Paste Tools

  • The copy/paste buffer currently stores a set of temporary F-Curves containing only the keyframes that were selected in each of the original F-Curves.
  • All pasted frames are offset by the same amount. This is calculated as the difference in the times of the current frame and the first keyframe (i.e. the earliest one in all channels).
  • The earliest frame is calculated per copy operation.
const EnumPropertyItem blender::rna_enum_keyframe_paste_offset_items []
const EnumPropertyItem blender::rna_enum_keyframe_paste_offset_value_items []
const EnumPropertyItem blender::rna_enum_keyframe_paste_merge_items []
void blender::ANIM_fcurves_copybuf_reset ()
void blender::ANIM_fcurves_copybuf_free ()
static bool blender::is_animating_bone (const bAnimListElem *ale)
bool blender::copy_animedit_keys (bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data)
static float blender::paste_get_y_offset (const bAnimContext *ac, const FCurve &fcurve_in_copy_buffer, const bAnimListElem *ale, const eKeyPasteValueOffset value_offset_mode)
eKeyPasteError blender::paste_animedit_keys (bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data, const KeyframePasteContext &paste_context)