Blender  V2.93
Classes | Typedefs | Enumerations | Functions
BKE_animsys.h File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Classes

struct  AnimationEvalContext
 
struct  AnimationBasePathChange
 

Typedefs

typedef struct AnimationEvalContext AnimationEvalContext
 
typedef struct AnimationBasePathChange AnimationBasePathChange
 
typedef void(* ID_AnimData_Edit_Callback) (struct ID *id, struct AnimData *adt, void *user_data)
 
typedef void(* ID_FCurve_Edit_Callback) (struct ID *id, struct FCurve *fcu, void *user_data)
 
typedef struct NlaKeyframingContext NlaKeyframingContext
 
typedef enum eAnimData_Recalc eAnimData_Recalc
 

Enumerations

enum  eAnimData_Recalc { ADT_RECALC_DRIVERS = (1 << 0) , ADT_RECALC_ANIM = (1 << 1) , ADT_RECALC_ALL = (ADT_RECALC_DRIVERS | ADT_RECALC_ANIM) }
 

Functions

AnimationEvalContext BKE_animsys_eval_context_construct (struct Depsgraph *depsgraph, float eval_time)
 
AnimationEvalContext BKE_animsys_eval_context_construct_at (const AnimationEvalContext *anim_eval_context, float eval_time)
 
struct KeyingSet * BKE_keyingset_add (struct ListBase *list, const char idname[], const char name[], short flag, short keyingflag)
 
struct KS_Path * BKE_keyingset_add_path (struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, short flag, short groupmode)
 
struct KS_Path * BKE_keyingset_find_path (struct KeyingSet *ks, struct ID *id, const char group_name[], const char rna_path[], int array_index, int group_mode)
 
void BKE_keyingsets_copy (struct ListBase *newlist, const struct ListBase *list)
 
void BKE_keyingsets_foreach_id (struct LibraryForeachIDData *data, const struct ListBase *keyingsets)
 
void BKE_keyingset_free_path (struct KeyingSet *ks, struct KS_Path *ksp)
 
void BKE_keyingset_free (struct KeyingSet *ks)
 
void BKE_keyingsets_free (struct ListBase *list)
 
void BKE_keyingsets_blend_write (struct BlendWriter *writer, struct ListBase *list)
 
void BKE_keyingsets_blend_read_data (struct BlendDataReader *reader, struct ListBase *list)
 
void BKE_keyingsets_blend_read_lib (struct BlendLibReader *reader, struct ID *id, struct ListBase *list)
 
void BKE_keyingsets_blend_read_expand (struct BlendExpander *expander, struct ListBase *list)
 
char * BKE_animsys_fix_rna_path_rename (struct ID *owner_id, char *old_path, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
 
void BKE_action_fix_paths_rename (struct ID *owner_id, struct bAction *act, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
 
void BKE_animdata_fix_paths_rename (struct ID *owner_id, struct AnimData *adt, struct ID *ref_id, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
 
void BKE_animdata_fix_paths_rename_all (struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
 
void BKE_animdata_fix_paths_rename_all_ex (struct Main *bmain, struct ID *ref_id, const char *prefix, const char *oldName, const char *newName, const int oldSubscript, const int newSubscript, const bool verify_paths)
 
bool BKE_animdata_fix_paths_remove (struct ID *id, const char *path)
 
void BKE_animdata_transfer_by_basepath (struct Main *bmain, struct ID *srcID, struct ID *dstID, struct ListBase *basepaths)
 
char * BKE_animdata_driver_path_hack (struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, char *base_path)
 
void BKE_animdata_main_cb (struct Main *bmain, ID_AnimData_Edit_Callback func, void *user_data)
 
void BKE_fcurves_main_cb (struct Main *bmain, ID_FCurve_Edit_Callback func, void *user_data)
 
void BKE_fcurves_id_cb (struct ID *id, ID_FCurve_Edit_Callback func, void *user_data)
 
struct NlaKeyframingContext * BKE_animsys_get_nla_keyframing_context (struct ListBase *cache, struct PointerRNA *ptr, struct AnimData *adt, const struct AnimationEvalContext *anim_eval_context)
 
bool BKE_animsys_nla_remap_keyframe_values (struct NlaKeyframingContext *context, struct PointerRNA *prop_ptr, struct PropertyRNA *prop, float *values, int count, int index, bool *r_force_all)
 
void BKE_animsys_free_nla_keyframing_context_cache (struct ListBase *cache)
 
bool BKE_animsys_rna_path_resolve (struct PointerRNA *ptr, const char *rna_path, const int array_index, struct PathResolvedRNA *r_result)
 
bool BKE_animsys_read_from_rna_path (struct PathResolvedRNA *anim_rna, float *r_value)
 
bool BKE_animsys_write_to_rna_path (struct PathResolvedRNA *anim_rna, const float value)
 
void BKE_animsys_evaluate_animdata (struct ID *id, struct AnimData *adt, const struct AnimationEvalContext *anim_eval_context, eAnimData_Recalc recalc, const bool flush_to_original)
 
void BKE_animsys_evaluate_all_animation (struct Main *main, struct Depsgraph *depsgraph, float ctime)
 
void animsys_evaluate_action (struct PointerRNA *ptr, struct bAction *act, const struct AnimationEvalContext *anim_eval_context, bool flush_to_original)
 
void animsys_evaluate_action_group (struct PointerRNA *ptr, struct bAction *act, struct bActionGroup *agrp, const struct AnimationEvalContext *anim_eval_context)
 
void BKE_animsys_eval_animdata (struct Depsgraph *depsgraph, struct ID *id)
 
void BKE_animsys_eval_driver (struct Depsgraph *depsgraph, struct ID *id, int driver_index, struct FCurve *fcu_orig)
 
void BKE_animsys_update_driver_array (struct ID *id)
 

Typedef Documentation

◆ AnimationBasePathChange

◆ AnimationEvalContext

◆ eAnimData_Recalc

◆ ID_AnimData_Edit_Callback

typedef void(* ID_AnimData_Edit_Callback) (struct ID *id, struct AnimData *adt, void *user_data)

Definition at line 194 of file BKE_animsys.h.

◆ ID_FCurve_Edit_Callback

typedef void(* ID_FCurve_Edit_Callback) (struct ID *id, struct FCurve *fcu, void *user_data)

Definition at line 197 of file BKE_animsys.h.

◆ NlaKeyframingContext

Definition at line 206 of file BKE_animsys.h.

Enumeration Type Documentation

◆ eAnimData_Recalc

Enumerator
ADT_RECALC_DRIVERS 
ADT_RECALC_ANIM 
ADT_RECALC_ALL 

Definition at line 236 of file BKE_animsys.h.

Function Documentation

◆ animsys_evaluate_action()

void animsys_evaluate_action ( struct PointerRNA *  ptr,
struct bAction *  act,
const struct AnimationEvalContext *  anim_eval_context,
bool  flush_to_original 
)

Referenced by BKE_pose_apply_action().

◆ animsys_evaluate_action_group()

void animsys_evaluate_action_group ( struct PointerRNA *  ptr,
struct bAction *  act,
struct bActionGroup *  agrp,
const struct AnimationEvalContext *  anim_eval_context 
)

◆ BKE_action_fix_paths_rename()

void BKE_action_fix_paths_rename ( struct ID *  owner_id,
struct bAction *  act,
const char *  prefix,
const char *  oldName,
const char *  newName,
int  oldSubscript,
int  newSubscript,
bool  verify_paths 
)

◆ BKE_animdata_driver_path_hack()

char* BKE_animdata_driver_path_hack ( bContext *  C,
PointerRNA *  ptr,
PropertyRNA *  prop,
char *  base_path 
)

Temporary wrapper for driver operators for buttons to make it easier to create such drivers by rerouting all paths through the active object instead so that they will get picked up by the dependency system.

Parameters
CContext pointer - for getting active data
[in,out]ptrRNA pointer for property's data-block. May be modified as result of path remapping.
propRNA definition of property to add for
Returns
MEM_alloc'd string representing the path to the property from the given PointerRNA

Definition at line 732 of file anim_data.c.

References blender::compositor::area(), C, CTX_data_active_object(), CTX_wm_area(), PointerRNA::data, Object::id, PointerRNA::owner_id, ptr, RNA_path_from_ID_to_property(), RNA_pointer_create(), SPACE_PROPERTIES, and PointerRNA::type.

Referenced by add_driver_button_invoke(), add_driver_button_none(), BKE_fcurve_find_by_rna_context_ui(), copy_driver_button_exec(), driverdropper_sample(), paste_driver_button_exec(), and remove_driver_button_exec().

◆ BKE_animdata_fix_paths_remove()

bool BKE_animdata_fix_paths_remove ( struct ID *  id,
const char *  path 
)

◆ BKE_animdata_fix_paths_rename()

void BKE_animdata_fix_paths_rename ( struct ID *  owner_id,
struct AnimData *  adt,
struct ID *  ref_id,
const char *  prefix,
const char *  oldName,
const char *  newName,
int  oldSubscript,
int  newSubscript,
bool  verify_paths 
)

◆ BKE_animdata_fix_paths_rename_all()

void BKE_animdata_fix_paths_rename_all ( struct ID *  ref_id,
const char *  prefix,
const char *  oldName,
const char *  newName 
)

◆ BKE_animdata_fix_paths_rename_all_ex()

void BKE_animdata_fix_paths_rename_all_ex ( struct Main *  bmain,
struct ID *  ref_id,
const char *  prefix,
const char *  oldName,
const char *  newName,
const int  oldSubscript,
const int  newSubscript,
const bool  verify_paths 
)

◆ BKE_animdata_main_cb()

void BKE_animdata_main_cb ( struct Main *  bmain,
ID_AnimData_Edit_Callback  func,
void *  user_data 
)

◆ BKE_animdata_transfer_by_basepath()

void BKE_animdata_transfer_by_basepath ( struct Main *  bmain,
struct ID *  srcID,
struct ID *  dstID,
struct ListBase *  basepaths 
)

◆ BKE_animsys_eval_animdata()

void BKE_animsys_eval_animdata ( struct Depsgraph *  depsgraph,
struct ID *  id 
)

◆ BKE_animsys_eval_context_construct()

AnimationEvalContext BKE_animsys_eval_context_construct ( struct Depsgraph *  depsgraph,
float  eval_time 
)

◆ BKE_animsys_eval_context_construct_at()

AnimationEvalContext BKE_animsys_eval_context_construct_at ( const AnimationEvalContext *  anim_eval_context,
float  eval_time 
)

◆ BKE_animsys_eval_driver()

void BKE_animsys_eval_driver ( struct Depsgraph *  depsgraph,
struct ID *  id,
int  driver_index,
struct FCurve *  fcu_orig 
)

◆ BKE_animsys_evaluate_all_animation()

void BKE_animsys_evaluate_all_animation ( struct Main *  main,
struct Depsgraph *  depsgraph,
float  ctime 
)

◆ BKE_animsys_evaluate_animdata()

void BKE_animsys_evaluate_animdata ( struct ID *  id,
struct AnimData *  adt,
const struct AnimationEvalContext *  anim_eval_context,
eAnimData_Recalc  recalc,
const bool  flush_to_original 
)

◆ BKE_animsys_fix_rna_path_rename()

char* BKE_animsys_fix_rna_path_rename ( struct ID *  owner_id,
char *  old_path,
const char *  prefix,
const char *  oldName,
const char *  newName,
int  oldSubscript,
int  newSubscript,
bool  verify_paths 
)

◆ BKE_animsys_free_nla_keyframing_context_cache()

void BKE_animsys_free_nla_keyframing_context_cache ( struct ListBase *  cache)

◆ BKE_animsys_get_nla_keyframing_context()

struct NlaKeyframingContext* BKE_animsys_get_nla_keyframing_context ( struct ListBase *  cache,
struct PointerRNA *  ptr,
struct AnimData *  adt,
const struct AnimationEvalContext *  anim_eval_context 
)

◆ BKE_animsys_nla_remap_keyframe_values()

bool BKE_animsys_nla_remap_keyframe_values ( struct NlaKeyframingContext *  context,
struct PointerRNA *  prop_ptr,
struct PropertyRNA *  prop,
float *  values,
int  count,
int  index,
bool *  r_force_all 
)

Apply correction from the NLA context to the values about to be keyframed.

Parameters
contextContext to use (may be NULL).
prop_ptrProperty about to be keyframed.
[in,out]valuesArray of property values to adjust.
countNumber of values in the array.
indexIndex of the element about to be updated, or -1.
[out]r_force_allSet to true if all channels must be inserted. May be NULL.
Returns
False if correction fails due to a division by zero, or null r_force_all when all channels are required.

Remove lower NLA stack effects.

Using the tweak strip's blended result and the lower snapshot value, we can solve for the tweak strip value it must evaluate to.

Definition at line 2648 of file anim_sys.c.

References NlaEvalChannel::base_snapshot, BLI_assert, context, count, ELEM, NlaEvalData::eval_snapshot, NlaEvalChannelSnapshot::length, NlaEvalChannel::mix_mode, NEC_MIX_QUATERNION, nla_blend_get_inverted_strip_value(), nla_combine_get_inverted_strip_value(), nla_combine_quaternion_get_inverted_strip_values(), nlaeval_snapshot_find_channel(), nlaevalchan_verify_key(), NLASTRIP_MODE_COMBINE, NLASTRIP_MODE_REPLACE, NULL, NlaEvalChannelKey::ptr, and NlaEvalChannelSnapshot::values.

Referenced by get_keyframe_values().

◆ BKE_animsys_read_from_rna_path()

bool BKE_animsys_read_from_rna_path ( struct PathResolvedRNA *  anim_rna,
float *  r_value 
)

◆ BKE_animsys_rna_path_resolve()

bool BKE_animsys_rna_path_resolve ( struct PointerRNA *  ptr,
const char *  rna_path,
const int  array_index,
struct PathResolvedRNA *  r_result 
)

◆ BKE_animsys_update_driver_array()

void BKE_animsys_update_driver_array ( struct ID *  id)

◆ BKE_animsys_write_to_rna_path()

bool BKE_animsys_write_to_rna_path ( struct PathResolvedRNA *  anim_rna,
const float  value 
)

◆ BKE_fcurves_id_cb()

void BKE_fcurves_id_cb ( struct ID *  id,
ID_FCurve_Edit_Callback  func,
void *  user_data 
)

◆ BKE_fcurves_main_cb()

void BKE_fcurves_main_cb ( struct Main *  bmain,
ID_FCurve_Edit_Callback  func,
void *  user_data 
)

◆ BKE_keyingset_add()

struct KeyingSet* BKE_keyingset_add ( struct ListBase *  list,
const char  idname[],
const char  name[],
short  flag,
short  keyingflag 
)

◆ BKE_keyingset_add_path()

struct KS_Path* BKE_keyingset_add_path ( struct KeyingSet *  ks,
struct ID *  id,
const char  group_name[],
const char  rna_path[],
int  array_index,
short  flag,
short  groupmode 
)

◆ BKE_keyingset_find_path()

struct KS_Path* BKE_keyingset_find_path ( struct KeyingSet *  ks,
struct ID *  id,
const char  group_name[],
const char  rna_path[],
int  array_index,
int  group_mode 
)

◆ BKE_keyingset_free()

void BKE_keyingset_free ( struct KeyingSet *  ks)

◆ BKE_keyingset_free_path()

void BKE_keyingset_free_path ( struct KeyingSet *  ks,
struct KS_Path *  ksp 
)

◆ BKE_keyingsets_blend_read_data()

void BKE_keyingsets_blend_read_data ( struct BlendDataReader *  reader,
struct ListBase *  list 
)

Definition at line 341 of file anim_sys.c.

References BLO_read_data_address, BLO_read_list(), LISTBASE_FOREACH, and KeyingSet::paths.

Referenced by scene_blend_read_data().

◆ BKE_keyingsets_blend_read_expand()

void BKE_keyingsets_blend_read_expand ( struct BlendExpander *  expander,
struct ListBase *  list 
)

Definition at line 363 of file anim_sys.c.

References BLO_expand, LISTBASE_FOREACH, and KeyingSet::paths.

Referenced by scene_blend_read_expand().

◆ BKE_keyingsets_blend_read_lib()

void BKE_keyingsets_blend_read_lib ( struct BlendLibReader *  reader,
struct ID *  id,
struct ListBase *  list 
)

Definition at line 354 of file anim_sys.c.

References BLO_read_id_address, id, Library::id, ID::lib, LISTBASE_FOREACH, and KeyingSet::paths.

Referenced by scene_blend_read_lib().

◆ BKE_keyingsets_blend_write()

void BKE_keyingsets_blend_write ( struct BlendWriter *  writer,
struct ListBase *  list 
)

Definition at line 323 of file anim_sys.c.

References BLO_write_string(), BLO_write_struct, LISTBASE_FOREACH, and KeyingSet::paths.

Referenced by scene_blend_write().

◆ BKE_keyingsets_copy()

void BKE_keyingsets_copy ( struct ListBase *  newlist,
const struct ListBase *  list 
)

Referenced by scene_copy_data().

◆ BKE_keyingsets_foreach_id()

void BKE_keyingsets_foreach_id ( struct LibraryForeachIDData *  data,
const struct ListBase *  keyingsets 
)

Process the ID pointers inside a scene's keyingsets, in see BKE_lib_query.h for details.

Referenced by scene_foreach_id().

◆ BKE_keyingsets_free()

void BKE_keyingsets_free ( struct ListBase *  list)