Blender  V2.93
Classes | Macros | Typedefs | Enumerations | Functions
BKE_fcurve.h File Reference
#include "DNA_curve_types.h"

Go to the source code of this file.

Classes

struct  CfraElem
 
struct  FModifierTypeInfo
 
struct  FModifiersStackStorage
 

Macros

#define BEZT_BINARYSEARCH_THRESH   0.01f /* was 0.00001, but giving errors */
 

Typedefs

typedef struct CfraElem CfraElem
 
typedef struct FModifierTypeInfo FModifierTypeInfo
 
typedef enum eFMI_Action_Types eFMI_Action_Types
 
typedef enum eFMI_Requirement_Flags eFMI_Requirement_Flags
 
typedef struct FModifiersStackStorage FModifiersStackStorage
 
typedef enum eFCU_Cycle_Type eFCU_Cycle_Type
 
typedef float(* FcuSampleFunc) (struct FCurve *fcu, void *data, float evaltime)
 

Enumerations

enum  eFMI_Action_Types { FMI_TYPE_EXTRAPOLATION = 0 , FMI_TYPE_INTERPOLATION , FMI_TYPE_REPLACE_VALUES , FMI_TYPE_GENERATE_CURVE }
 
enum  eFMI_Requirement_Flags { FMI_REQUIRES_ORIGINAL_DATA = (1 << 0) , FMI_REQUIRES_NOTHING = (1 << 1) , FMI_REQUIRES_RUNTIME_CHECK = (1 << 2) }
 
enum  eFCU_Cycle_Type { FCU_CYCLE_NONE = 0 , FCU_CYCLE_PERFECT , FCU_CYCLE_OFFSET }
 

Functions

const FModifierTypeInfofmodifier_get_typeinfo (const struct FModifier *fcm)
 
const FModifierTypeInfoget_fmodifier_typeinfo (const int type)
 
struct FModifieradd_fmodifier (ListBase *modifiers, int type, struct FCurve *owner_fcu)
 
struct FModifiercopy_fmodifier (const struct FModifier *src)
 
void copy_fmodifiers (ListBase *dst, const ListBase *src)
 
bool remove_fmodifier (ListBase *modifiers, struct FModifier *fcm)
 
void free_fmodifiers (ListBase *modifiers)
 
struct FModifierfind_active_fmodifier (ListBase *modifiers)
 
void set_active_fmodifier (ListBase *modifiers, struct FModifier *fcm)
 
bool list_has_suitable_fmodifier (ListBase *modifiers, int mtype, short acttype)
 
uint evaluate_fmodifiers_storage_size_per_modifier (ListBase *modifiers)
 
float evaluate_time_fmodifiers (FModifiersStackStorage *storage, ListBase *modifiers, struct FCurve *fcu, float cvalue, float evaltime)
 
void evaluate_value_fmodifiers (FModifiersStackStorage *storage, ListBase *modifiers, struct FCurve *fcu, float *cvalue, float evaltime)
 
void fcurve_bake_modifiers (struct FCurve *fcu, int start, int end)
 
int BKE_fcm_envelope_find_index (struct FCM_EnvelopeData *array, float frame, int arraylen, bool *r_exists)
 
struct FCurveBKE_fcurve_create (void)
 
void BKE_fcurve_free (struct FCurve *fcu)
 
struct FCurveBKE_fcurve_copy (const struct FCurve *fcu)
 
void BKE_fcurves_free (ListBase *list)
 
void BKE_fcurves_copy (ListBase *dst, ListBase *src)
 
void BKE_fcurve_foreach_id (struct FCurve *fcu, struct LibraryForeachIDData *data)
 
struct FCurveBKE_fcurve_find (ListBase *list, const char rna_path[], const int array_index)
 
struct FCurveBKE_fcurve_iter_step (struct FCurve *fcu_iter, const char rna_path[])
 
struct FCurveid_data_find_fcurve (ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven)
 
int BKE_fcurves_filter (ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName)
 
struct FCurveBKE_fcurve_find_by_rna (struct PointerRNA *ptr, struct PropertyRNA *prop, int rnaindex, struct AnimData **r_adt, struct bAction **r_action, bool *r_driven, bool *r_special)
 
struct FCurveBKE_fcurve_find_by_rna_context_ui (struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int rnaindex, struct AnimData **r_animdata, struct bAction **r_action, bool *r_driven, bool *r_special)
 
int BKE_fcurve_bezt_binarysearch_index (struct BezTriple array[], float frame, int arraylen, bool *r_replace)
 
struct FCurvePathCacheBKE_fcurve_pathcache_create (ListBase *list)
 
void BKE_fcurve_pathcache_destroy (struct FCurvePathCache *fcache)
 
struct FCurveBKE_fcurve_pathcache_find (struct FCurvePathCache *fcache, const char rna_path[], const int array_index)
 
int BKE_fcurve_pathcache_find_array (struct FCurvePathCache *fcache, const char *rna_path, struct FCurve **fcurve_result, int fcurve_result_len)
 
bool BKE_fcurve_calc_range (struct FCurve *fcu, float *min, float *max, const bool do_sel_only, const bool do_min_length)
 
bool BKE_fcurve_calc_bounds (struct FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, const bool do_sel_only, const bool include_handles)
 
floatBKE_fcurves_calc_keyed_frames_ex (struct FCurve **fcurve_array, const int fcurve_array_len, const float interval, int *r_frames_len)
 
floatBKE_fcurves_calc_keyed_frames (struct FCurve **fcurve_array, const int fcurve_array_len, int *r_frames_len)
 
void BKE_fcurve_active_keyframe_set (struct FCurve *fcu, const struct BezTriple *active_bezt)
 
int BKE_fcurve_active_keyframe_index (const struct FCurve *fcu)
 
void BKE_fcurve_keyframe_move_value_with_handles (struct BezTriple *keyframe, float new_value)
 
bool BKE_fcurve_are_keyframes_usable (struct FCurve *fcu)
 
bool BKE_fcurve_is_keyframable (struct FCurve *fcu)
 
bool BKE_fcurve_is_protected (struct FCurve *fcu)
 
bool BKE_fcurve_is_cyclic (struct FCurve *fcu)
 
eFCU_Cycle_Type BKE_fcurve_get_cycle_type (struct FCurve *fcu)
 
bool BKE_fcurve_bezt_subdivide_handles (struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, float *r_pdelta)
 
void calchandles_fcurve (struct FCurve *fcu)
 
void calchandles_fcurve_ex (struct FCurve *fcu, eBezTriple_Flag handle_sel_flag)
 
void testhandles_fcurve (struct FCurve *fcu, eBezTriple_Flag sel_flag, const bool use_handle)
 
void sort_time_fcurve (struct FCurve *fcu)
 
bool test_time_fcurve (struct FCurve *fcu)
 
void BKE_fcurve_correct_bezpart (const float v1[2], float v2[2], float v3[2], const float v4[2])
 
float evaluate_fcurve (struct FCurve *fcu, float evaltime)
 
float evaluate_fcurve_only_curve (struct FCurve *fcu, float evaltime)
 
float evaluate_fcurve_driver (struct PathResolvedRNA *anim_rna, struct FCurve *fcu, struct ChannelDriver *driver_orig, const struct AnimationEvalContext *anim_eval_context)
 
bool BKE_fcurve_is_empty (struct FCurve *fcu)
 
float calculate_fcurve (struct PathResolvedRNA *anim_rna, struct FCurve *fcu, const struct AnimationEvalContext *anim_eval_context)
 
float fcurve_samplingcb_evalcurve (struct FCurve *fcu, void *data, float evaltime)
 
void fcurve_store_samples (struct FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
 
void fcurve_samples_to_keyframes (struct FCurve *fcu, const int start, const int end)
 
void BKE_fmodifiers_blend_write (struct BlendWriter *writer, struct ListBase *fmodifiers)
 
void BKE_fmodifiers_blend_read_data (struct BlendDataReader *reader, ListBase *fmodifiers, struct FCurve *curve)
 
void BKE_fmodifiers_blend_read_lib (struct BlendLibReader *reader, struct ID *id, struct ListBase *fmodifiers)
 
void BKE_fmodifiers_blend_read_expand (struct BlendExpander *expander, struct ListBase *fmodifiers)
 
void BKE_fcurve_blend_write (struct BlendWriter *writer, struct ListBase *fcurves)
 
void BKE_fcurve_blend_read_data (struct BlendDataReader *reader, struct ListBase *fcurves)
 
void BKE_fcurve_blend_read_lib (struct BlendLibReader *reader, struct ID *id, struct ListBase *fcurves)
 
void BKE_fcurve_blend_read_expand (struct BlendExpander *expander, struct ListBase *fcurves)
 

Macro Definition Documentation

◆ BEZT_BINARYSEARCH_THRESH

#define BEZT_BINARYSEARCH_THRESH   0.01f /* was 0.00001, but giving errors */

Definition at line 181 of file BKE_fcurve.h.

Typedef Documentation

◆ CfraElem

typedef struct CfraElem CfraElem

◆ eFCU_Cycle_Type

◆ eFMI_Action_Types

◆ eFMI_Requirement_Flags

◆ FcuSampleFunc

typedef float(* FcuSampleFunc) (struct FCurve *fcu, void *data, float evaltime)

Definition at line 338 of file BKE_fcurve.h.

◆ FModifiersStackStorage

◆ FModifierTypeInfo

Enumeration Type Documentation

◆ eFCU_Cycle_Type

Enumerator
FCU_CYCLE_NONE 
FCU_CYCLE_PERFECT 
FCU_CYCLE_OFFSET 

Definition at line 289 of file BKE_fcurve.h.

◆ eFMI_Action_Types

Enumerator
FMI_TYPE_EXTRAPOLATION 
FMI_TYPE_INTERPOLATION 
FMI_TYPE_REPLACE_VALUES 
FMI_TYPE_GENERATE_CURVE 

Definition at line 112 of file BKE_fcurve.h.

◆ eFMI_Requirement_Flags

Enumerator
FMI_REQUIRES_ORIGINAL_DATA 
FMI_REQUIRES_NOTHING 
FMI_REQUIRES_RUNTIME_CHECK 

Definition at line 124 of file BKE_fcurve.h.

Function Documentation

◆ add_fmodifier()

struct FModifier* add_fmodifier ( ListBase modifiers,
int  type,
FCurve owner_fcu 
)

◆ BKE_fcm_envelope_find_index()

int BKE_fcm_envelope_find_index ( struct FCM_EnvelopeData array,
float  frame,
int  arraylen,
bool *  r_exists 
)

◆ BKE_fcurve_active_keyframe_index()

int BKE_fcurve_active_keyframe_index ( const struct FCurve fcu)

◆ BKE_fcurve_active_keyframe_set()

void BKE_fcurve_active_keyframe_set ( struct FCurve fcu,
const struct BezTriple active_bezt 
)

◆ BKE_fcurve_are_keyframes_usable()

bool BKE_fcurve_are_keyframes_usable ( struct FCurve fcu)

◆ BKE_fcurve_bezt_binarysearch_index()

int BKE_fcurve_bezt_binarysearch_index ( struct BezTriple  array[],
float  frame,
int  arraylen,
bool *  r_replace 
)

◆ BKE_fcurve_bezt_subdivide_handles()

bool BKE_fcurve_bezt_subdivide_handles ( struct BezTriple bezt,
struct BezTriple prev,
struct BezTriple next,
float r_pdelta 
)

Adjust Bezier handles of all three given BezTriples, so that bezt can be inserted between prev and next without changing the resulting curve shape.

Parameters
r_pdeltareturn Y difference between bezt and the original curve value at its X position.
Returns
Whether the split was successful.

Definition at line 1714 of file fcurve.c.

References add_v2_v2v2(), BKE_fcurve_correct_bezpart(), copy_v2_v2(), findzero(), interp_v2_v2v2(), next, sub_v2_v2v2(), t, and BezTriple::vec.

Referenced by subdivide_nonauto_handles(), and blender::bke::tests::TEST().

◆ BKE_fcurve_blend_read_data()

void BKE_fcurve_blend_read_data ( struct BlendDataReader reader,
struct ListBase fcurves 
)

◆ BKE_fcurve_blend_read_expand()

void BKE_fcurve_blend_read_expand ( struct BlendExpander expander,
struct ListBase fcurves 
)

◆ BKE_fcurve_blend_read_lib()

void BKE_fcurve_blend_read_lib ( struct BlendLibReader reader,
struct ID id,
struct ListBase fcurves 
)

◆ BKE_fcurve_blend_write()

void BKE_fcurve_blend_write ( struct BlendWriter writer,
struct ListBase fcurves 
)

◆ BKE_fcurve_calc_bounds()

bool BKE_fcurve_calc_bounds ( struct FCurve fcu,
float xmin,
float xmax,
float ymin,
float ymax,
const bool  do_sel_only,
const bool  include_handles 
)

◆ BKE_fcurve_calc_range()

bool BKE_fcurve_calc_range ( struct FCurve fcu,
float min,
float max,
const bool  do_sel_only,
const bool  do_min_length 
)

◆ BKE_fcurve_copy()

struct FCurve* BKE_fcurve_copy ( const struct FCurve fcu)

◆ BKE_fcurve_correct_bezpart()

void BKE_fcurve_correct_bezpart ( const float  v1[2],
float  v2[2],
float  v3[2],
const float  v4[2] 
)

The length of each handle is not allowed to be more than the horizontal distance between (v1-v4). This is to prevent curve loops.

This function is very similar to BKE_curve_correct_bezpart(), but allows a steeper tangent for more snappy animations. This is not desired for other areas in which curves are used, though.

Definition at line 1521 of file fcurve.c.

References fabsf, len, v1, and v2.

Referenced by BKE_fcurve_bezt_subdivide_handles(), draw_fcurve_curve_bezts(), fcurve_eval_keyframes_interpolate(), and normalization_factor_get().

◆ BKE_fcurve_create()

struct FCurve* BKE_fcurve_create ( void  )

◆ BKE_fcurve_find()

struct FCurve* BKE_fcurve_find ( ListBase list,
const char  rna_path[],
const int  array_index 
)

◆ BKE_fcurve_find_by_rna()

struct FCurve* BKE_fcurve_find_by_rna ( struct PointerRNA ptr,
struct PropertyRNA prop,
int  rnaindex,
struct AnimData **  r_adt,
struct bAction **  r_action,
bool *  r_driven,
bool *  r_special 
)

Definition at line 378 of file fcurve.c.

References BKE_fcurve_find_by_rna_context_ui(), NULL, and ptr.

Referenced by RNA_property_animated().

◆ BKE_fcurve_find_by_rna_context_ui()

struct FCurve* BKE_fcurve_find_by_rna_context_ui ( struct bContext C,
struct PointerRNA ptr,
struct PropertyRNA prop,
int  rnaindex,
struct AnimData **  r_animdata,
struct bAction **  r_action,
bool *  r_driven,
bool *  r_special 
)

◆ BKE_fcurve_foreach_id()

void BKE_fcurve_foreach_id ( FCurve fcu,
LibraryForeachIDData data 
)

◆ BKE_fcurve_free()

void BKE_fcurve_free ( struct FCurve fcu)

◆ BKE_fcurve_get_cycle_type()

eFCU_Cycle_Type BKE_fcurve_get_cycle_type ( struct FCurve fcu)

◆ BKE_fcurve_is_cyclic()

bool BKE_fcurve_is_cyclic ( struct FCurve fcu)

◆ BKE_fcurve_is_empty()

bool BKE_fcurve_is_empty ( struct FCurve fcu)

◆ BKE_fcurve_is_keyframable()

bool BKE_fcurve_is_keyframable ( struct FCurve fcu)

◆ BKE_fcurve_is_protected()

bool BKE_fcurve_is_protected ( struct FCurve fcu)

◆ BKE_fcurve_iter_step()

struct FCurve* BKE_fcurve_iter_step ( struct FCurve fcu_iter,
const char  rna_path[] 
)

Definition at line 304 of file fcurve.c.

References ELEM, FCurve::next, NULL, FCurve::rna_path, and STREQ.

Referenced by ANIM_remove_driver().

◆ BKE_fcurve_keyframe_move_value_with_handles()

void BKE_fcurve_keyframe_move_value_with_handles ( struct BezTriple keyframe,
float  new_value 
)

Definition at line 947 of file fcurve.c.

References BezTriple::vec.

Referenced by euler_filter_multi_channel(), and blender::bke::tests::TEST().

◆ BKE_fcurve_pathcache_create()

struct FCurvePathCache* BKE_fcurve_pathcache_create ( ListBase list)

◆ BKE_fcurve_pathcache_destroy()

void BKE_fcurve_pathcache_destroy ( struct FCurvePathCache fcache)

◆ BKE_fcurve_pathcache_find()

struct FCurve* BKE_fcurve_pathcache_find ( struct FCurvePathCache fcache,
const char  rna_path[],
const int  array_index 
)

◆ BKE_fcurve_pathcache_find_array()

int BKE_fcurve_pathcache_find_array ( struct FCurvePathCache fcache,
const char *  rna_path,
FCurve **  fcurve_result,
int  fcurve_result_len 
)

Fill in an array of F-Curve, leave NULL when not found.

Returns
The number of F-Curves found.

Definition at line 163 of file fcurve_cache.c.

References FCurve::array_index, BLI_ghash_lookup(), FCurvePathCache::fcurve_array, FCurvePathCache_Span::index, FCurvePathCache_Span::len, len, NULL, and FCurvePathCache::span_from_rna_path.

Referenced by action_flip_pchan_cache_fcurve_assign_array().

◆ BKE_fcurves_calc_keyed_frames()

float* BKE_fcurves_calc_keyed_frames ( struct FCurve **  fcurve_array,
const int  fcurve_array_len,
int *  r_frames_len 
)

Definition at line 885 of file fcurve.c.

References BKE_fcurves_calc_keyed_frames_ex().

Referenced by action_flip_pchan().

◆ BKE_fcurves_calc_keyed_frames_ex()

float* BKE_fcurves_calc_keyed_frames_ex ( FCurve **  fcurve_array,
int  fcurve_array_len,
const float  interval,
int *  r_frames_len 
)

Return an array of keyed frames, rounded to interval.

Parameters
intervalSet to 1.0 to round to whole keyframes, 0.5 for in-between key-frames, etc.
Note
An interval of zero could be supported (this implies no rounding at all), however this risks very small differences in float values being treated as separate keyframes.

Definition at line 850 of file fcurve.c.

References FCurve::bezt, BLI_assert, BLI_gset_add(), BLI_gset_free(), BLI_gset_int_new(), BLI_gset_len(), BLI_gsetIterator_getKey(), BLI_sortutil_cmp_float(), double(), GSET_ITER_INDEX, max_ff(), MEM_mallocN, NULL, POINTER_AS_INT, POINTER_FROM_INT, FCurve::totvert, and BezTriple::vec.

Referenced by BKE_fcurves_calc_keyed_frames().

◆ BKE_fcurves_copy()

void BKE_fcurves_copy ( ListBase dst,
ListBase src 
)

◆ BKE_fcurves_filter()

int BKE_fcurves_filter ( ListBase dst,
ListBase src,
const char *  dataPrefix,
const char *  dataName 
)

Get list of LinkData's containing pointers to the F-Curves which control the types of data indicated.

Lists...

  • dst: list of LinkData's matching the criteria returned. List must be freed after use, and is assumed to be empty when passed.
  • src: list of F-Curves to search through Filters...
  • dataPrefix: i.e. 'pose.bones[' or 'nodes['
  • dataName: name of entity within "" immediately following the prefix

Definition at line 336 of file fcurve.c.

References BLI_addtail(), BLI_str_quoted_substrN(), LinkData::data, ELEM, ListBase::first, MEM_callocN, MEM_freeN, FCurve::next, NULL, FCurve::rna_path, and STREQ.

Referenced by updateDuplicateActionConstraintSettings().

◆ BKE_fcurves_free()

void BKE_fcurves_free ( ListBase list)

◆ BKE_fmodifiers_blend_read_data()

void BKE_fmodifiers_blend_read_data ( struct BlendDataReader reader,
ListBase fmodifiers,
struct FCurve curve 
)

◆ BKE_fmodifiers_blend_read_expand()

void BKE_fmodifiers_blend_read_expand ( struct BlendExpander expander,
struct ListBase fmodifiers 
)

◆ BKE_fmodifiers_blend_read_lib()

void BKE_fmodifiers_blend_read_lib ( struct BlendLibReader reader,
struct ID id,
struct ListBase fmodifiers 
)

Definition at line 2369 of file fcurve.c.

References BLO_read_id_address, data, FMODIFIER_TYPE_PYTHON, id, ID::lib, and LISTBASE_FOREACH.

Referenced by BKE_fcurve_blend_read_lib().

◆ BKE_fmodifiers_blend_write()

void BKE_fmodifiers_blend_write ( struct BlendWriter writer,
struct ListBase fmodifiers 
)

◆ calchandles_fcurve()

void calchandles_fcurve ( FCurve fcu)

◆ calchandles_fcurve_ex()

void calchandles_fcurve_ex ( FCurve fcu,
eBezTriple_Flag  handle_sel_flag 
)

Variant of calchandles_fcurve() that allows calculating based on a different select flag.

Parameters
handle_sel_flagThe flag (bezt.f1/2/3) value to use to determine selection. Usually SELECT, but may want to use a different one at times (if caller does not operate on selection).

Definition at line 1302 of file fcurve.c.

References Freestyle::a, BezTriple::auto_handle_type, FCurve::auto_smoothing, FCurve::bezt, BEZT_IS_AUTOH, BKE_fcurve_is_cyclic(), BKE_nurb_handle_calc_ex(), BKE_nurb_handle_smooth_fcurve(), cycle_offset_triple(), ELEM, FCurve::extend, FCURVE_EXTRAPOLATE_CONSTANT, FCURVE_SMOOTH_NONE, HD_AUTOTYPE_LOCKED_FINAL, HD_AUTOTYPE_NORMAL, next, NULL, FCurve::totvert, and BezTriple::vec.

Referenced by action_flip_pchan(), calchandles_fcurve(), and testhandles_fcurve().

◆ calculate_fcurve()

float calculate_fcurve ( struct PathResolvedRNA anim_rna,
struct FCurve fcu,
const struct AnimationEvalContext anim_eval_context 
)

◆ copy_fmodifier()

struct FModifier* copy_fmodifier ( const struct FModifier src)

◆ copy_fmodifiers()

void copy_fmodifiers ( ListBase dst,
const ListBase src 
)

◆ evaluate_fcurve()

float evaluate_fcurve ( struct FCurve fcu,
float  evaltime 
)

◆ evaluate_fcurve_driver()

float evaluate_fcurve_driver ( struct PathResolvedRNA anim_rna,
struct FCurve fcu,
struct ChannelDriver driver_orig,
const struct AnimationEvalContext anim_eval_context 
)

◆ evaluate_fcurve_only_curve()

float evaluate_fcurve_only_curve ( struct FCurve fcu,
float  evaltime 
)

◆ evaluate_fmodifiers_storage_size_per_modifier()

uint evaluate_fmodifiers_storage_size_per_modifier ( ListBase modifiers)

◆ evaluate_time_fmodifiers()

float evaluate_time_fmodifiers ( FModifiersStackStorage storage,
ListBase modifiers,
FCurve fcu,
float  cvalue,
float  evaltime 
)

Evaluate time modifications imposed by some F-Curve Modifiers.

  • This step acts as an optimization to prevent the F-Curve stack being evaluated several times by modifiers requesting the time be modified, as the final result would have required using the modified time
  • Modifiers only ever receive the unmodified time, as subsequent modifiers should be working on the 'global' result of the modified curve, not some localized segment, so evaltime gets set to whatever the last time-modifying modifier likes.
  • We start from the end of the stack, as only the last one matters for now.
Parameters
fcuCan be NULL.

Definition at line 1457 of file fmodifier.c.

References FModifiersStackStorage::buffer, FModifier::efra, ELEM, eval_fmodifier_influence(), evaltime, FModifierTypeInfo::evaluate_modifier_time, FCURVE_MOD_OFF, FModifier::flag, FCurve::flag, FMODIFIER_FLAG_DISABLED, FMODIFIER_FLAG_MUTED, FMODIFIER_FLAG_RANGERESTRICT, fmodifier_get_typeinfo(), interpf(), ListBase::last, FModifiersStackStorage::modifier_count, NULL, POINTER_OFFSET, FModifier::prev, FModifier::sfra, and FModifiersStackStorage::size_per_modifier.

Referenced by evaluate_fcurve_ex(), and nlasnapshot_from_action().

◆ evaluate_value_fmodifiers()

void evaluate_value_fmodifiers ( FModifiersStackStorage storage,
ListBase modifiers,
FCurve fcu,
float cvalue,
float  evaltime 
)

◆ fcurve_bake_modifiers()

void fcurve_bake_modifiers ( FCurve fcu,
int  start,
int  end 
)

Bake modifiers for given F-Curve to curve sample data, in the frame range defined by start and end (inclusive).

Definition at line 1570 of file fmodifier.c.

References CLOG_ERROR, FCurve::driver, ELEM, fcurve_samplingcb_evalcurve(), fcurve_store_samples(), ListBase::first, free_fmodifiers(), LOG, FCurve::modifiers, and NULL.

◆ fcurve_samples_to_keyframes()

void fcurve_samples_to_keyframes ( struct FCurve fcu,
const int  start,
const int  end 
)

◆ fcurve_samplingcb_evalcurve()

float fcurve_samplingcb_evalcurve ( struct FCurve fcu,
void *  data,
float  evaltime 
)

◆ fcurve_store_samples()

void fcurve_store_samples ( struct FCurve fcu,
void *  data,
int  start,
int  end,
FcuSampleFunc  sample_cb 
)

◆ find_active_fmodifier()

struct FModifier* find_active_fmodifier ( ListBase modifiers)

Find the active F-Modifier.

Definition at line 1288 of file fmodifier.c.

References ELEM, ListBase::first, FModifier::flag, FMODIFIER_FLAG_ACTIVE, FModifier::next, and NULL.

Referenced by ANIM_fmodifiers_copy_to_buf(), and draw_fcurve().

◆ fmodifier_get_typeinfo()

const FModifierTypeInfo* fmodifier_get_typeinfo ( const struct FModifier fcm)

◆ free_fmodifiers()

void free_fmodifiers ( ListBase modifiers)

◆ get_fmodifier_typeinfo()

const FModifierTypeInfo* get_fmodifier_typeinfo ( const int  type)

This function should be used for getting the appropriate type-info when only a F-Curve modifier type is known.

Definition at line 1072 of file fmodifier.c.

References CLOG_ERROR, FMI_INIT, FMODIFIER_NUM_TYPES, FMODIFIER_TYPE_NULL, fmodifiersTypeInfo, fmods_init_typeinfo(), LOG, NULL, and type.

Referenced by add_fmodifier(), fmodifier_get_typeinfo(), fmodifier_panel_register(), fmodifier_reorder(), graph_fmodifier_itemf(), graph_fmodifier_panel_id(), nla_fmodifier_itemf(), and nla_fmodifier_panel_id().

◆ id_data_find_fcurve()

struct FCurve* id_data_find_fcurve ( ID id,
void *  data,
struct StructRNA type,
const char *  prop_name,
int  index,
bool *  r_driven 
)

◆ list_has_suitable_fmodifier()

bool list_has_suitable_fmodifier ( ListBase modifiers,
int  mtype,
short  acttype 
)

Do we have any modifiers which match certain criteria.

Parameters
mtypeType of modifier (if 0, doesn't matter).
acttypeType of action to perform (if -1, doesn't matter).

Definition at line 1337 of file fmodifier.c.

References FModifierTypeInfo::acttype, ELEM, ListBase::first, fmodifier_get_typeinfo(), FModifier::next, NULL, and FModifier::type.

Referenced by BKE_fcurve_is_empty(), setexpo_action_keys(), and setexpo_graph_keys().

◆ remove_fmodifier()

bool remove_fmodifier ( ListBase modifiers,
FModifier fcm 
)

◆ set_active_fmodifier()

void set_active_fmodifier ( ListBase modifiers,
FModifier fcm 
)

Set the active F-Modifier.

Definition at line 1311 of file fmodifier.c.

References ELEM, ListBase::first, FModifier::flag, FMODIFIER_FLAG_ACTIVE, FModifier::next, and NULL.

Referenced by graph_fmodifier_add_exec(), and nla_fmodifier_add_exec().

◆ sort_time_fcurve()

void sort_time_fcurve ( struct FCurve fcu)

◆ test_time_fcurve()

bool test_time_fcurve ( struct FCurve fcu)

◆ testhandles_fcurve()

void testhandles_fcurve ( FCurve fcu,
eBezTriple_Flag  sel_flag,
const bool  use_handle 
)

Update handles, making sure the handle-types are valid (e.g. correctly deduced from an "Auto" type), and recalculating their position vectors. Use when something has changed handle positions.

Parameters
sel_flagThe flag (bezt.f1/2/3) value to use to determine selection. Usually SELECT, but may want to use a different one at times (if caller does not operate on selection).
use_handleCheck selection state of individual handles, otherwise always update both handles if the key is selected.

Definition at line 1407 of file fcurve.c.

References Freestyle::a, FCurve::bezt, BKE_nurb_bezt_handle_test(), calchandles_fcurve_ex(), ELEM, and NULL.

Referenced by posttrans_fcurve_clean(), and remake_graph_transdata().