Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_animsys.h
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| struct PointerRNA; | struct PointerRNA; | ||||
| struct PropertyRNA; | struct PropertyRNA; | ||||
| struct ReportList; | struct ReportList; | ||||
| struct Scene; | struct Scene; | ||||
| struct bAction; | struct bAction; | ||||
| struct bActionGroup; | struct bActionGroup; | ||||
| struct bContext; | struct bContext; | ||||
| /* Container for data required to do FCurve and Driver evaluation. */ | |||||
| typedef struct AnimationEvalContext { | |||||
| /* For drivers, so that they have access to the dependency graph and the current view layer. See | |||||
| * T77086. */ | |||||
| struct Depsgraph *const depsgraph; | |||||
| /* FCurves and Drivers can be evaluated at a different time than the current | |||||
| * scene time, for example when inserting a keyframe for a specific frame. | |||||
| * This means that, even though the current time is stored in the dependency | |||||
| * graph, we need an explicit evaluation time. */ | |||||
| const float eval_time; | |||||
| } AnimationEvalContext; | |||||
| AnimationEvalContext BKE_animsys_eval_context(struct Depsgraph *depsgraph, float eval_time); | |||||
| AnimationEvalContext BKE_animsys_eval_context_at(const AnimationEvalContext *anim_eval_context, | |||||
| float eval_time); | |||||
| /* ************************************* */ | /* ************************************* */ | ||||
| /* KeyingSets API */ | /* KeyingSets API */ | ||||
| /* Used to create a new 'custom' KeyingSet for the user, | /* Used to create a new 'custom' KeyingSet for the user, | ||||
| * that will be automatically added to the stack */ | * that will be automatically added to the stack */ | ||||
| struct KeyingSet *BKE_keyingset_add( | struct KeyingSet *BKE_keyingset_add( | ||||
| struct ListBase *list, const char idname[], const char name[], short flag, short keyingflag); | struct ListBase *list, const char idname[], const char name[], short flag, short keyingflag); | ||||
| ▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | |||||
| /* ************************************* */ | /* ************************************* */ | ||||
| // TODO: overrides, remapping, and path-finding api's | // TODO: overrides, remapping, and path-finding api's | ||||
| /* ------------ NLA Keyframing --------------- */ | /* ------------ NLA Keyframing --------------- */ | ||||
| typedef struct NlaKeyframingContext NlaKeyframingContext; | typedef struct NlaKeyframingContext NlaKeyframingContext; | ||||
| struct NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context(struct ListBase *cache, | struct NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context( | ||||
| struct ListBase *cache, | |||||
| struct PointerRNA *ptr, | struct PointerRNA *ptr, | ||||
| struct AnimData *adt, | struct AnimData *adt, | ||||
| float ctime, | const struct AnimationEvalContext *anim_eval_context, | ||||
| const bool flush_to_original); | const bool flush_to_original); | ||||
| bool BKE_animsys_nla_remap_keyframe_values(struct NlaKeyframingContext *context, | bool BKE_animsys_nla_remap_keyframe_values(struct NlaKeyframingContext *context, | ||||
| struct PointerRNA *prop_ptr, | struct PointerRNA *prop_ptr, | ||||
| struct PropertyRNA *prop, | struct PropertyRNA *prop, | ||||
| float *values, | float *values, | ||||
| int count, | int count, | ||||
| int index, | int index, | ||||
| bool *r_force_all); | bool *r_force_all); | ||||
| void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache); | void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache); | ||||
| Show All 16 Lines | bool BKE_animsys_store_rna_setting(struct PointerRNA *ptr, | ||||
| const int array_index, | const int array_index, | ||||
| struct PathResolvedRNA *r_result); | struct PathResolvedRNA *r_result); | ||||
| bool BKE_animsys_read_rna_setting(struct PathResolvedRNA *anim_rna, float *r_value); | bool BKE_animsys_read_rna_setting(struct PathResolvedRNA *anim_rna, float *r_value); | ||||
| bool BKE_animsys_write_rna_setting(struct PathResolvedRNA *anim_rna, const float value); | bool BKE_animsys_write_rna_setting(struct PathResolvedRNA *anim_rna, const float value); | ||||
| /* Evaluation loop for evaluating animation data */ | /* Evaluation loop for evaluating animation data */ | ||||
| void BKE_animsys_evaluate_animdata(struct ID *id, | void BKE_animsys_evaluate_animdata(struct ID *id, | ||||
| struct AnimData *adt, | struct AnimData *adt, | ||||
| float ctime, | const struct AnimationEvalContext *anim_eval_context, | ||||
| eAnimData_Recalc recalc, | eAnimData_Recalc recalc, | ||||
| const bool flush_to_original); | const bool flush_to_original); | ||||
| /* Evaluation of all ID-blocks with Animation Data blocks - Animation Data Only */ | /* Evaluation of all ID-blocks with Animation Data blocks - Animation Data Only */ | ||||
| void BKE_animsys_evaluate_all_animation(struct Main *main, | void BKE_animsys_evaluate_all_animation(struct Main *main, | ||||
| struct Depsgraph *depsgraph, | struct Depsgraph *depsgraph, | ||||
| float ctime); | float ctime); | ||||
| /* ------------ Specialized API --------------- */ | /* ------------ Specialized API --------------- */ | ||||
| /* There are a few special tools which require these following functions. They are NOT to be used | /* There are a few special tools which require these following functions. They are NOT to be used | ||||
| * for standard animation evaluation UNDER ANY CIRCUMSTANCES! | * for standard animation evaluation UNDER ANY CIRCUMSTANCES! | ||||
| * | * | ||||
| * i.e. Pose Library (PoseLib) uses some of these for selectively applying poses, but | * i.e. Pose Library (PoseLib) uses some of these for selectively applying poses, but | ||||
| * Particles/Sequencer performing funky time manipulation is not ok. | * Particles/Sequencer performing funky time manipulation is not ok. | ||||
| */ | */ | ||||
| /* Evaluate Action (F-Curve Bag) */ | /* Evaluate Action (F-Curve Bag) */ | ||||
| void animsys_evaluate_action(struct PointerRNA *ptr, | void animsys_evaluate_action(struct PointerRNA *ptr, | ||||
| struct bAction *act, | struct bAction *act, | ||||
| float ctime, | const struct AnimationEvalContext *anim_eval_context, | ||||
| const bool flush_to_original); | const bool flush_to_original); | ||||
| /* Evaluate Action Group */ | /* Evaluate Action Group */ | ||||
| void animsys_evaluate_action_group(struct PointerRNA *ptr, | void animsys_evaluate_action_group(struct PointerRNA *ptr, | ||||
| struct bAction *act, | struct bAction *act, | ||||
| struct bActionGroup *agrp, | struct bActionGroup *agrp, | ||||
| float ctime); | const struct AnimationEvalContext *anim_eval_context); | ||||
| /* ************************************* */ | /* ************************************* */ | ||||
| /* ------------ Evaluation API --------------- */ | /* ------------ Evaluation API --------------- */ | ||||
| struct Depsgraph; | struct Depsgraph; | ||||
| void BKE_animsys_eval_animdata(struct Depsgraph *depsgraph, struct ID *id); | void BKE_animsys_eval_animdata(struct Depsgraph *depsgraph, struct ID *id); | ||||
| Show All 14 Lines | |||||