|
Blender
V2.93
|
#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 FModifierTypeInfo * | fmodifier_get_typeinfo (const struct FModifier *fcm) |
| const FModifierTypeInfo * | get_fmodifier_typeinfo (const int type) |
| struct FModifier * | add_fmodifier (ListBase *modifiers, int type, struct FCurve *owner_fcu) |
| struct FModifier * | copy_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 FModifier * | find_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 FCurve * | BKE_fcurve_create (void) |
| void | BKE_fcurve_free (struct FCurve *fcu) |
| struct FCurve * | BKE_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 FCurve * | BKE_fcurve_find (ListBase *list, const char rna_path[], const int array_index) |
| struct FCurve * | BKE_fcurve_iter_step (struct FCurve *fcu_iter, const char rna_path[]) |
| struct FCurve * | id_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 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) |
| 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) |
| int | BKE_fcurve_bezt_binarysearch_index (struct BezTriple array[], float frame, int arraylen, bool *r_replace) |
| struct FCurvePathCache * | BKE_fcurve_pathcache_create (ListBase *list) |
| void | BKE_fcurve_pathcache_destroy (struct FCurvePathCache *fcache) |
| struct FCurve * | BKE_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) |
| float * | BKE_fcurves_calc_keyed_frames_ex (struct FCurve **fcurve_array, const int fcurve_array_len, const float interval, int *r_frames_len) |
| float * | BKE_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) |
| #define BEZT_BINARYSEARCH_THRESH 0.01f /* was 0.00001, but giving errors */ |
Definition at line 181 of file BKE_fcurve.h.
| typedef enum eFCU_Cycle_Type eFCU_Cycle_Type |
| typedef enum eFMI_Action_Types eFMI_Action_Types |
| typedef enum eFMI_Requirement_Flags eFMI_Requirement_Flags |
Definition at line 338 of file BKE_fcurve.h.
| typedef struct FModifiersStackStorage FModifiersStackStorage |
| typedef struct FModifierTypeInfo FModifierTypeInfo |
| enum eFCU_Cycle_Type |
| Enumerator | |
|---|---|
| FCU_CYCLE_NONE | |
| FCU_CYCLE_PERFECT | |
| FCU_CYCLE_OFFSET | |
Definition at line 289 of file BKE_fcurve.h.
| enum 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.
| Enumerator | |
|---|---|
| FMI_REQUIRES_ORIGINAL_DATA | |
| FMI_REQUIRES_NOTHING | |
| FMI_REQUIRES_RUNTIME_CHECK | |
Definition at line 124 of file BKE_fcurve.h.
Add a new F-Curve Modifier to the given F-Curve of a certain type.
Definition at line 1114 of file fmodifier.c.
References BLI_addtail(), BLI_listbase_is_single(), calchandles_fcurve(), CLOG_STR_ERROR, FModifier::curve, FModifier::data, ELEM, ListBase::first, FModifier::flag, FMODIFIER_FLAG_ACTIVE, FMODIFIER_TYPE_CYCLES, get_fmodifier_typeinfo(), FModifier::influence, LOG, MEM_callocN, FModifierTypeInfo::new_data, NULL, FModifierTypeInfo::size, FModifierTypeInfo::structName, type, FModifier::type, FModifier::ui_expand_flag, and UI_PANEL_DATA_EXPAND_ROOT.
Referenced by alloc_driver_fcurve(), ED_object_parent_set(), followpath_path_animate_exec(), graph_fmodifier_add_exec(), icu_to_fcurves(), nla_fmodifier_add_exec(), setexpo_action_keys(), and setexpo_graph_keys().
| int BKE_fcm_envelope_find_index | ( | struct FCM_EnvelopeData * | array, |
| float | frame, | ||
| int | arraylen, | ||
| bool * | r_exists | ||
| ) |
Referenced by fmod_envelope_addpoint_cb().
| int BKE_fcurve_active_keyframe_index | ( | const struct FCurve * | fcu | ) |
Referenced by delete_fcurve_keys(), insert_vert_fcurve(), mouse_graph_keys(), and blender::bke::tests::TEST().
| bool BKE_fcurve_are_keyframes_usable | ( | struct FCurve * | fcu | ) |
Definition at line 963 of file fcurve.c.
References data, FModifier::data, FCM_GENERATOR_ADDITIVE, ListBase::first, FModifier::flag, FMODIFIER_FLAG_DISABLED, FMODIFIER_FLAG_MUTED, FMODIFIER_TYPE_CYCLES, FMODIFIER_TYPE_FN_GENERATOR, FMODIFIER_TYPE_GENERATOR, FMODIFIER_TYPE_NOISE, FMODIFIER_TYPE_STEPPED, FCurve::fpt, if(), ListBase::last, FCurve::modifiers, NULL, FModifier::prev, and FModifier::type.
Referenced by BKE_fcurve_is_keyframable(), draw_fcurve(), and graphop_visible_keyframes_poll().
| int BKE_fcurve_bezt_binarysearch_index | ( | struct BezTriple | array[], |
| float | frame, | ||
| int | arraylen, | ||
| bool * | r_replace | ||
| ) |
Definition at line 600 of file fcurve.c.
References BEZT_BINARYSEARCH_THRESH, and BKE_fcurve_bezt_binarysearch_index_ex().
Referenced by delete_key_button_exec(), delete_keyframe_fcurve(), fcurve_frame_has_keyframe(), gather_frames_to_render_for_adt(), insert_bezt_fcurve(), pose_propagate_fcurve(), and pyrna_struct_keyframe_delete().
| 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.
| r_pdelta | return Y difference between bezt and the original curve value at its X position. |
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().
| void BKE_fcurve_blend_read_data | ( | struct BlendDataReader * | reader, |
| struct ListBase * | fcurves | ||
| ) |
Definition at line 2436 of file fcurve.c.
References FCurve::bezt, BKE_fmodifiers_blend_read_data(), BLO_read_data_address, BLO_read_list(), FCurve::driver, DRIVER_FLAG_INVALID, DRIVER_TARGETS_LOOPER_BEGIN, DRIVER_TARGETS_LOOPER_END, ChannelDriver::expr_comp, ChannelDriver::expr_simple, FCURVE_DISABLED, ChannelDriver::flag, FCurve::flag, FCurve::fpt, FCurve::grp, LISTBASE_FOREACH, FCurve::modifiers, NULL, FCurve::rna_path, and ChannelDriver::variables.
Referenced by action_blend_read_data(), BKE_animdata_blend_read_data(), and blend_data_read_nla_strips().
| void BKE_fcurve_blend_read_expand | ( | struct BlendExpander * | expander, |
| struct ListBase * | fcurves | ||
| ) |
Definition at line 2521 of file fcurve.c.
References BKE_fmodifiers_blend_read_expand(), BLO_expand, FCurve::driver, DRIVER_TARGETS_LOOPER_BEGIN, DRIVER_TARGETS_LOOPER_END, LISTBASE_FOREACH, FCurve::modifiers, and ChannelDriver::variables.
Referenced by action_blend_read_expand(), BKE_animdata_blend_read_expand(), and blend_read_expand_nla_strips().
| void BKE_fcurve_blend_read_lib | ( | struct BlendLibReader * | reader, |
| struct ID * | id, | ||
| struct ListBase * | fcurves | ||
| ) |
Definition at line 2491 of file fcurve.c.
References BKE_fmodifiers_blend_read_lib(), BLO_read_id_address, FCurve::driver, DRIVER_TARGETS_LOOPER_BEGIN, DRIVER_TARGETS_LOOPER_END, id, Library::id, ID::lib, LISTBASE_FOREACH, FCurve::modifiers, NULL, and ChannelDriver::variables.
Referenced by action_blend_read_lib(), BKE_animdata_blend_read_lib(), and blend_lib_read_nla_strips().
| void BKE_fcurve_blend_write | ( | struct BlendWriter * | writer, |
| struct ListBase * | fcurves | ||
| ) |
Definition at line 2397 of file fcurve.c.
References FCurve::bezt, BKE_fmodifiers_blend_write(), BLO_write_string(), BLO_write_struct, BLO_write_struct_array, BLO_write_struct_list, FCurve::driver, DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER_BEGIN, FCurve::fpt, LISTBASE_FOREACH, FCurve::modifiers, FCurve::rna_path, FCurve::totvert, and ChannelDriver::variables.
Referenced by action_blend_write(), BKE_animdata_blend_write(), and blend_write_nla_strips().
| 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 | ||
| ) |
Definition at line 664 of file fcurve.c.
References FCurve::bezt, BEZT_IPO_BEZ, BEZT_ISSEL_ANY, BLI_assert, FCurve::fpt, G, G_DEBUG, get_fcurve_end_keyframes(), BezTriple::ipo, max_ff(), max_fff(), min_ff(), min_fff(), NULL, FCurve::totvert, FPoint::vec, and BezTriple::vec.
| bool BKE_fcurve_calc_range | ( | struct FCurve * | fcu, |
| float * | min, | ||
| float * | max, | ||
| const bool | do_sel_only, | ||
| const bool | do_min_length | ||
| ) |
Definition at line 795 of file fcurve.c.
References FCurve::bezt, BLI_assert, FCurve::fpt, get_fcurve_end_keyframes(), max, max_ff(), min, min_ff(), NULL, FCurve::totvert, FPoint::vec, and BezTriple::vec.
Referenced by calc_action_range(), draw_fcurve_curve(), and get_keyframe_extents().
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().
| struct FCurve* BKE_fcurve_create | ( | void | ) |
Definition at line 68 of file fcurve.c.
References MEM_callocN.
Referenced by alloc_driver_fcurve(), BKE_nlastrip_validate_fcurves(), ED_action_fcurve_ensure(), icu_to_fcurves(), and blender::bke::tests::TEST().
Definition at line 274 of file fcurve.c.
References FCurve::array_index, ELEM, ListBase::first, FCurve::next, NULL, FCurve::rna_path, and STREQ.
Referenced by BKE_fcurve_find_by_rna_context_ui(), BKE_nlastrip_validate_fcurves(), delete_key_button_exec(), ED_action_fcurve_ensure(), ED_action_fcurve_find(), followpath_path_animate_exec(), id_data_find_fcurve(), insert_key_button_exec(), make_new_animlistelem(), nla_draw_strip_curves(), pyrna_struct_driver_add(), pyrna_struct_keyframe_delete(), pyrna_struct_keyframe_insert(), seq_convert_transform_animation(), seq_convert_transform_animation_2(), and verify_driver_fcurve().
| 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().
| 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 | ||
| ) |
Definition at line 390 of file fcurve.c.
References AnimData::action, BKE_animdata_driver_path_hack(), BKE_animdata_from_id(), BKE_fcurve_find(), BKE_nlastrip_has_curves_for_property(), C, bAction::curves, PointerRNA::data, AnimData::drivers, NlaStrip::fcurves, ListBase::first, MEM_freeN, MEM_SAFE_FREE, NULL, PointerRNA::owner_id, ptr, RNA_path_from_ID_to_property(), RNA_property_animateable(), and RNA_property_identifier().
Referenced by add_driver_button_poll(), BKE_fcurve_find_by_rna(), drivers_editor_show_exec(), ED_autokeyframe_property(), graph_panel_drivers_popover(), insert_key_button_exec(), and ui_but_get_fcurve().
| void BKE_fcurve_foreach_id | ( | FCurve * | fcu, |
| LibraryForeachIDData * | data | ||
| ) |
Callback used by lib_query to walk over all ID usages (mimics foreach_id callback of IDTypeInfo structure).
Definition at line 188 of file fcurve.c.
References BKE_LIB_FOREACHID_PROCESS, BKE_LIB_FOREACHID_PROCESS_ID, BKE_lib_query_idpropertiesForeachIDLink_callback(), data, FCurve::driver, DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER_BEGIN, FMODIFIER_TYPE_PYTHON, IDP_foreach_property(), IDP_TYPE_FILTER_ID, IDWALK_CB_NOP, LISTBASE_FOREACH, FCurve::modifiers, NULL, FMod_Python::prop, FMod_Python::script, and ChannelDriver::variables.
Referenced by action_foreach_id(), BKE_animdata_foreach_id(), and BKE_nla_strip_foreach_id().
| void BKE_fcurve_free | ( | struct FCurve * | fcu | ) |
Definition at line 81 of file fcurve.c.
References FCurve::bezt, fcurve_free_driver(), FCurve::fpt, free_fmodifiers(), MEM_freeN, MEM_SAFE_FREE, FCurve::modifiers, NULL, and FCurve::rna_path.
Referenced by ANIM_drivers_copybuf_free(), ANIM_fcurve_delete_from_animdata(), ANIM_remove_driver(), animchannels_delete_exec(), BKE_fcurves_free(), fcurve_path_rename(), fcurve_remove(), fcurves_path_remove_fix(), remove_sequencer_fcurves(), seq_free_animdata(), blender::bke::tests::TEST(), and AnimationImporter::~AnimationImporter().
| eFCU_Cycle_Type BKE_fcurve_get_cycle_type | ( | struct FCurve * | fcu | ) |
Definition at line 1232 of file fcurve.c.
References data, FModifier::data, ELEM, FCM_EXTRAPOLATE_CYCLIC, FCM_EXTRAPOLATE_CYCLIC_OFFSET, FCU_CYCLE_NONE, FCU_CYCLE_OFFSET, FCU_CYCLE_PERFECT, ListBase::first, FModifier::flag, FMODIFIER_FLAG_DISABLED, FMODIFIER_FLAG_MUTED, FMODIFIER_FLAG_RANGERESTRICT, FMODIFIER_FLAG_USEINFLUENCE, FMODIFIER_TYPE_CYCLES, if(), FCurve::modifiers, and FModifier::type.
Referenced by BKE_fcurve_is_cyclic(), insert_bezt_fcurve(), and remap_cyclic_keyframe_location().
| bool BKE_fcurve_is_cyclic | ( | struct FCurve * | fcu | ) |
Definition at line 1267 of file fcurve.c.
References BKE_fcurve_get_cycle_type(), and FCU_CYCLE_NONE.
Referenced by ANIM_fmodifiers_paste_from_buf(), calchandles_fcurve_ex(), and fcurve_to_keylist().
| bool BKE_fcurve_is_empty | ( | struct FCurve * | fcu | ) |
Definition at line 2250 of file fcurve.c.
References FCurve::driver, FMI_TYPE_GENERATE_CURVE, list_has_suitable_fmodifier(), FCurve::modifiers, NULL, and FCurve::totvert.
Referenced by animsys_evaluate_action_group(), calculate_fcurve(), clean_fcurve(), delete_action_keys(), delete_graph_keys(), delete_keyframe_fcurve(), draw_seq_fcurve_overlay(), draw_seq_waveform_overlay(), is_fcurve_evaluatable(), seq_convert_transform_animation(), seq_convert_transform_animation_2(), and ui_but_anim_flag().
| bool BKE_fcurve_is_keyframable | ( | struct FCurve * | fcu | ) |
Definition at line 1031 of file fcurve.c.
References BKE_fcurve_are_keyframes_usable(), and BKE_fcurve_is_protected().
Referenced by graphkeys_click_insert_exec(), graphop_editable_keyframes_poll(), and insert_keyframe_value().
| bool BKE_fcurve_is_protected | ( | struct FCurve * | fcu | ) |
Definition at line 1023 of file fcurve.c.
References AGRP_PROTECTED, FCURVE_PROTECTED, bActionGroup::flag, FCurve::flag, and FCurve::grp.
Referenced by BKE_fcurve_is_keyframable(), clear_keyframe(), delete_key_button_exec(), delete_key_v3d_exec(), delete_keyframe(), draw_fcurve(), and pyrna_struct_keyframe_delete().
Definition at line 304 of file fcurve.c.
References ELEM, FCurve::next, NULL, FCurve::rna_path, and STREQ.
Referenced by ANIM_remove_driver().
Definition at line 947 of file fcurve.c.
References BezTriple::vec.
Referenced by euler_filter_multi_channel(), and blender::bke::tests::TEST().
| struct FCurvePathCache* BKE_fcurve_pathcache_create | ( | ListBase * | list | ) |
Definition at line 78 of file fcurve_cache.c.
References BLI_assert, BLI_ghash_insert(), BLI_ghash_str_new_ex(), BLI_listbase_count(), FCurvePathCache::fcurve_array, FCurvePathCache::fcurve_array_len, fcurve_cmp_for_cache(), FCurvePathCache_Span::index, FCurvePathCache_Span::len, LISTBASE_FOREACH_INDEX, MEM_callocN, MEM_mallocN, FCurvePathCache::span_from_rna_path, FCurvePathCache::span_table, and STREQ.
Referenced by BKE_action_flip_with_pose().
| void BKE_fcurve_pathcache_destroy | ( | struct FCurvePathCache * | fcache | ) |
Definition at line 127 of file fcurve_cache.c.
References BLI_ghash_free(), FCurvePathCache::fcurve_array, MEM_freeN, NULL, FCurvePathCache::span_from_rna_path, and FCurvePathCache::span_table.
Referenced by BKE_action_flip_with_pose().
| struct FCurve* BKE_fcurve_pathcache_find | ( | struct FCurvePathCache * | fcache, |
| const char | rna_path[], | ||
| const int | array_index | ||
| ) |
Referenced by action_flip_pchan_cache_fcurve_assign_value().
| 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.
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().
| 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().
| 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.
| interval | Set to 1.0 to round to whole keyframes, 0.5 for in-between key-frames, etc. |
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().
Definition at line 165 of file fcurve.c.
References BKE_fcurve_copy(), BLI_addtail(), BLI_listbase_clear(), ELEM, ListBase::first, FCurve::next, and NULL.
Referenced by BKE_animdata_copy(), BKE_animdata_merge_copy(), BKE_nlastrip_copy(), BKE_object_copy_proxy_drivers(), undocurve_from_editcurve(), and undocurve_to_editcurve().
| 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...
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().
| void BKE_fcurves_free | ( | ListBase * | list | ) |
Definition at line 103 of file fcurve.c.
References BKE_fcurve_free(), BLI_listbase_clear(), ListBase::first, FCurve::next, and NULL.
Referenced by action_free_data(), BKE_animdata_free(), BKE_nlastrip_free(), BKE_object_copy_proxy_drivers(), cleardrivers_animdata_fn(), do_versions_ipos_to_animato(), graph_free(), graphkeys_clear_ghostcurves_exec(), undocurve_free_data(), and undocurve_to_editcurve().
| void BKE_fmodifiers_blend_read_data | ( | struct BlendDataReader * | reader, |
| ListBase * | fmodifiers, | ||
| struct FCurve * | curve | ||
| ) |
Definition at line 2336 of file fcurve.c.
References BLO_read_data_address, BLO_read_float_array(), curve, data, FMODIFIER_TYPE_ENVELOPE, FMODIFIER_TYPE_GENERATOR, FMODIFIER_TYPE_PYTHON, IDP_BlendDataRead, and LISTBASE_FOREACH.
Referenced by BKE_fcurve_blend_read_data(), and blend_data_read_nla_strips().
| void BKE_fmodifiers_blend_read_expand | ( | struct BlendExpander * | expander, |
| struct ListBase * | fmodifiers | ||
| ) |
Definition at line 2383 of file fcurve.c.
References BLO_expand, data, FMODIFIER_TYPE_PYTHON, and LISTBASE_FOREACH.
Referenced by BKE_fcurve_blend_read_expand(), and blend_read_expand_nla_strips().
| 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().
| void BKE_fmodifiers_blend_write | ( | struct BlendWriter * | writer, |
| struct ListBase * | fmodifiers | ||
| ) |
Definition at line 2286 of file fcurve.c.
References BLO_write_float_array(), BLO_write_struct_array, BLO_write_struct_by_name(), BLO_write_struct_list, data, fmodifier_get_typeinfo(), FMODIFIER_TYPE_ENVELOPE, FMODIFIER_TYPE_GENERATOR, FMODIFIER_TYPE_PYTHON, IDP_BlendWrite(), LISTBASE_FOREACH, and FModifierTypeInfo::structName.
Referenced by BKE_fcurve_blend_write(), and blend_write_nla_strips().
| void calchandles_fcurve | ( | FCurve * | fcu | ) |
This function recalculates the handles of an F-Curve. Acts based on selection with SELECT flag. To use a different flag, use calchandles_fcurve_ex().
If the BezTriples have been rearranged, sort them first before using this.
Definition at line 1391 of file fcurve.c.
References calchandles_fcurve_ex(), and SELECT.
Referenced by add_fmodifier(), alloc_driver_fcurve(), ANIM_animdata_keyframe_callback(), ANIM_animdata_update(), ANIM_fmodifiers_paste_from_buf(), delete_fcurve_key(), fcurve_samples_to_keyframes(), gpencil_stroke_path_animation(), graphedit_activekey_update_cb(), insert_vert_fcurve(), mirror_action_keys(), mirror_graph_keys(), nlaedit_apply_scale_exec(), paste_animedit_keys_fcurve(), remove_fmodifier(), sample_fcurve(), seteasing_graph_keys(), sethandles_action_keys(), sethandles_graph_keys(), setipo_graph_keys(), smooth_fcurve(), snap_action_keys(), and snap_graph_keys().
| void calchandles_fcurve_ex | ( | FCurve * | fcu, |
| eBezTriple_Flag | handle_sel_flag | ||
| ) |
Variant of calchandles_fcurve() that allows calculating based on a different select flag.
| handle_sel_flag | The 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().
| float calculate_fcurve | ( | struct PathResolvedRNA * | anim_rna, |
| struct FCurve * | fcu, | ||
| const struct AnimationEvalContext * | anim_eval_context | ||
| ) |
Referenced by ANIM_fmodifiers_copy_to_buf(), and ANIM_fmodifiers_paste_from_buf().
Duplicate all of the F-Modifiers in the Modifier stacks.
Definition at line 1197 of file fmodifier.c.
References BLI_duplicatelist(), BLI_listbase_clear(), FModifierTypeInfo::copy_data, FModifier::curve, FModifier::data, ELEM, ListBase::first, fmodifier_get_typeinfo(), MEM_dupallocN, FModifier::next, and NULL.
Referenced by ANIM_fmodifiers_copy_to_buf(), ANIM_paste_driver(), BKE_fcurve_copy(), and BKE_nlastrip_copy().
Definition at line 2186 of file fcurve.c.
References BLI_assert, FCurve::driver, evaltime, evaluate_fcurve_ex(), and NULL.
Referenced by BCAnimationCurve::adjust_range(), BKE_tracking_track_get_weight_for_marker(), calculate_fcurve(), draw_fcurve_curve(), draw_seq_fcurve_overlay(), draw_seq_waveform_overlay(), AnimationImporter::evaluate_animation(), fcurve_samplingcb_evalcurve(), fetch_from_fcurve(), get_animated_weight(), BCAnimationCurve::get_value(), insert_action_keys(), libmv_tracks_new(), new_key_needed(), nla_draw_strip_curves(), nlasnapshot_from_action(), pose_slide_apply_quat(), pose_slide_apply_val(), sample_fcurve(), seq_effect_speed_rebuild_map(), seq_render_effect_strip_impl(), and blender::bke::tests::TEST().
| float evaluate_fcurve_driver | ( | struct PathResolvedRNA * | anim_rna, |
| struct FCurve * | fcu, | ||
| struct ChannelDriver * | driver_orig, | ||
| const struct AnimationEvalContext * | anim_eval_context | ||
| ) |
Definition at line 2193 of file fcurve.c.
References evaltime, and evaluate_fcurve_ex().
Referenced by action_flip_pchan_cache_init(), insert_graph_keys(), and normalization_factor_get().
Definition at line 1376 of file fmodifier.c.
References ELEM, ListBase::first, fmodifier_get_typeinfo(), LISTBASE_FOREACH, MAX2, NULL, and FModifierTypeInfo::storage_size.
Referenced by evaluate_fcurve_ex(), and nlasnapshot_from_action().
| float evaluate_time_fmodifiers | ( | FModifiersStackStorage * | storage, |
| ListBase * | modifiers, | ||
| FCurve * | fcu, | ||
| float | cvalue, | ||
| float | evaltime | ||
| ) |
Evaluate time modifications imposed by some F-Curve Modifiers.
| fcu | Can 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().
| void evaluate_value_fmodifiers | ( | FModifiersStackStorage * | storage, |
| ListBase * | modifiers, | ||
| FCurve * | fcu, | ||
| float * | cvalue, | ||
| float | evaltime | ||
| ) |
Evaluates the given set of F-Curve Modifiers using the given data Should only be called after evaluate_time_fmodifiers() has been called.
Definition at line 1518 of file fmodifier.c.
References FModifiersStackStorage::buffer, FModifier::efra, ELEM, eval_fmodifier_influence(), evaltime, FModifierTypeInfo::evaluate_modifier, FCURVE_MOD_OFF, ListBase::first, FModifier::flag, FCurve::flag, FMODIFIER_FLAG_DISABLED, FMODIFIER_FLAG_MUTED, FMODIFIER_FLAG_RANGERESTRICT, fmodifier_get_typeinfo(), interpf(), FModifier::next, NULL, POINTER_OFFSET, FModifier::sfra, and FModifiersStackStorage::size_per_modifier.
Referenced by evaluate_fcurve_ex(), and nlasnapshot_from_action().
| 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.
| void fcurve_samples_to_keyframes | ( | struct FCurve * | fcu, |
| const int | start, | ||
| const int | end | ||
| ) |
Definition at line 1156 of file fcurve.c.
References FCurve::bezt, calchandles_fcurve(), CLOG_ERROR, copy_v2_v2(), float(), FCurve::fpt, init_unbaked_bezt_data(), LOG, MEM_callocN, MEM_freeN, MEM_SAFE_FREE, NULL, FCurve::totvert, FPoint::vec, and BezTriple::vec.
Referenced by unbake_graph_curves().
Referenced by bake_graph_curves(), and fcurve_bake_modifiers().
| void fcurve_store_samples | ( | struct FCurve * | fcu, |
| void * | data, | ||
| int | start, | ||
| int | end, | ||
| FcuSampleFunc | sample_cb | ||
| ) |
Definition at line 1108 of file fcurve.c.
References FCurve::bezt, CLOG_ERROR, data, ELEM, float(), FCurve::fpt, LOG, MEM_callocN, MEM_freeN, NULL, FCurve::totvert, and FPoint::vec.
Referenced by bake_graph_curves(), and fcurve_bake_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().
| const FModifierTypeInfo* fmodifier_get_typeinfo | ( | const struct FModifier * | fcm | ) |
Referenced by BKE_fmodifiers_blend_write(), and fmodifier_panel_header().
| void free_fmodifiers | ( | ListBase * | modifiers | ) |
Remove all of a given F-Curve's modifiers.
Definition at line 1269 of file fmodifier.c.
References ListBase::first, FModifier::next, NULL, and remove_fmodifier().
Referenced by ANIM_fmodifiers_copybuf_free(), ANIM_fmodifiers_paste_from_buf(), BKE_fcurve_free(), BKE_nlastrip_free(), and fcurve_bake_modifiers().
| 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().
| struct FCurve* id_data_find_fcurve | ( | ID * | id, |
| void * | data, | ||
| struct StructRNA * | type, | ||
| const char * | prop_name, | ||
| int | index, | ||
| bool * | r_driven | ||
| ) |
Definition at line 221 of file fcurve.c.
References AnimData::action, BKE_animdata_from_id(), BKE_fcurve_find(), bAction::curves, data, AnimData::drivers, ELEM, ListBase::first, MEM_freeN, NULL, ptr, RNA_path_from_ID_to_property(), RNA_pointer_create(), RNA_struct_find_property(), and type.
Referenced by BKE_tracking_track_get_weight_for_marker(), draw_seq_fcurve_overlay(), draw_seq_waveform_overlay(), libmv_tracks_new(), retrieve_stab_animation(), retrieve_track_weight_animation(), seq_effect_speed_rebuild_map(), seq_render_effect_strip_impl(), sound_update_animation_flags(), and sound_update_animation_flags_fn().
| bool list_has_suitable_fmodifier | ( | ListBase * | modifiers, |
| int | mtype, | ||
| short | acttype | ||
| ) |
Do we have any modifiers which match certain criteria.
| mtype | Type of modifier (if 0, doesn't matter). |
| acttype | Type 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 and free the given F-Modifier from the given stack.
Definition at line 1226 of file fmodifier.c.
References BLI_freelinkN(), calchandles_fcurve(), CLOG_STR_ERROR, FModifier::curve, FModifier::data, fmodifier_get_typeinfo(), FMODIFIER_TYPE_CYCLES, FModifierTypeInfo::free_data, if(), LOG, MEM_freeN, NULL, and FModifier::type.
Referenced by delete_fmodifier_cb(), free_fmodifiers(), setexpo_action_keys(), and setexpo_graph_keys().
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().
| void sort_time_fcurve | ( | struct FCurve * | fcu | ) |
Definition at line 1429 of file fcurve.c.
References Freestyle::a, FCurve::bezt, CLAMP_MAX, CLAMP_MIN, NULL, SWAP, swap_v2_v2(), FCurve::totvert, and BezTriple::vec.
Referenced by ANIM_animdata_update(), graphedit_activekey_update_cb(), and remake_graph_transdata().
| bool test_time_fcurve | ( | struct FCurve * | fcu | ) |
Definition at line 1472 of file fcurve.c.
References Freestyle::a, FCurve::bezt, FCurve::fpt, NULL, FCurve::totvert, FPoint::vec, and BezTriple::vec.
| 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.
| sel_flag | The 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_handle | Check 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().