92 const char group_name[],
93 const char rna_path[],
108 short eq_id = 1, eq_path = 1, eq_index = 1, eq_group = 1;
131 if (eq_id && eq_path && eq_index && eq_group) {
145 ListBase *list,
const char idname[],
const char name[],
short flag,
short keyingflag)
153 ks->
idname, (idname) ? idname : (name) ? name :
DATA_(
"KeyingSet"),
sizeof(ks->
idname));
180 const char group_name[],
181 const char rna_path[],
190 CLOG_ERROR(&
LOG,
"no Keying Set and/or RNA Path to add path with");
203 CLOG_ERROR(&
LOG,
"destination already exists in Keying Set");
217 ksp->
group[0] =
'\0';
266 for (ksn = newlist->
first; ksn; ksn = ksn->
next) {
278 for (
KS_Path *kspn = ksn->paths.first; kspn; kspn = kspn->
next) {
297 for (ksp = ks->
paths.
first; ksp; ksp = kspn) {
316 for (ks = list->
first; ks; ks = ksn) {
391 const char *rna_path,
392 const int array_index,
395 if (rna_path ==
NULL) {
399 const char *path = rna_path;
406 "Animato: Invalid path. ID = '%s', '%s[%d]'",
419 if (array_len && array_index >= array_len) {
422 "Animato: Invalid array index. ID = '%s', '%s[%d]', array length is %d",
431 r_result->
prop_index = array_len ? array_index : -1;
436 #define ANIMSYS_FLOAT_AS_BOOL(value) ((value) > ((1.0f - FLT_EPSILON)))
450 if (array_index != -1) {
452 orig_value = (
float)orig_value_coerce;
456 orig_value = (
float)orig_value_coerce;
461 if (array_index != -1) {
463 orig_value = (
float)orig_value_coerce;
467 orig_value = (
float)orig_value_coerce;
472 if (array_index != -1) {
474 orig_value = (
float)orig_value_coerce;
478 orig_value = (
float)orig_value_coerce;
484 orig_value = (
float)orig_value_coerce;
492 if (r_value !=
NULL) {
493 *r_value = orig_value;
515 if (old_value == value) {
522 if (array_index != -1) {
531 int value_coerce = (int)value;
533 if (array_index != -1) {
542 float value_coerce = value;
544 if (array_index != -1) {
553 const int value_coerce = (int)value;
591 const char *rna_path,
614 bool flush_to_original)
627 if (flush_to_original) {
642 .eval_time = eval_time,
717 else if (act->
idroot != idcode) {
721 "AnimSys Safety Check Failed: Action '%s' is not meant to be used from ID-Blocks of "
722 "type %d such as '%s'\n",
769 const bool flush_to_original)
809 const bool flush_to_original)
856 const bool flush_to_original)
861 float ctime = anim_eval_context->
eval_time;
864 for (strip = strips->
first; strip; strip = strip->
next) {
875 if (ctime < strip->start) {
876 if (strip == strips->
first) {
902 if (ctime > strip->
end) {
904 if (strip == strips->
last) {
927 ctime = estrip->
start;
941 anim_eval_context, ctime);
950 switch (estrip->
type) {
965 anim_eval_context, estrip->
start);
967 anim_eval_context, estrip->
end);
992 const bool flush_to_original)
995 single_tracks_list.
first = single_tracks_list.
last = single_strip;
998 dst_list, &single_tracks_list, -1, anim_eval_context, flush_to_original);
1037 return ((
A->ptr.data !=
B->ptr.data) || (
A->prop !=
B->prop));
1054 return nec_snapshot;
1082 snapshot->
base = base;
1085 "NlaEvalSnapshot::channels");
1098 snapshot->
size *= 2;
1102 size_t byte_size =
sizeof(*snapshot->
channels) * snapshot->
size;
1104 snapshot->
channels, byte_size,
"NlaEvalSnapshot::channels");
1120 while (snapshot !=
NULL) {
1122 if (nec_snapshot !=
NULL) {
1123 return nec_snapshot;
1125 snapshot = snapshot->
base;
1138 if (*slot ==
NULL) {
1146 *slot = nec_snapshot;
1156 for (
int i = 0; i < snapshot->
size; i++) {
1158 if (nec_snapshot !=
NULL) {
1182 memset(nlaeval, 0,
sizeof(*nlaeval));
1212 if (index >= 0 && index < nec->base_snapshot.length) {
1231 "Animation: Invalid array index. ID = '%s', '%s[%d]', array length is %d",
1232 id ? (
id->
name + 2) :
"<No ID>",
1274 for (
int i = 0; i <
length; i++) {
1275 r_values[i] = (
float)tmp_bool[i];
1282 for (
int i = 0; i <
length; i++) {
1283 r_values[i] = (
float)tmp_int[i];
1291 memset(r_values, 0,
sizeof(
float) *
length);
1317 for (
int i = 0; i <
length; i++) {
1318 if (r_values[i] == 0.0f) {
1350 nlaeval->
key_hash, key, (
void ***)&p_key, (
void ***)&p_key_nec);
1367 nec->
owner = nlaeval;
1417 "Animato: Invalid path. ID = '%s', '%s'",
1436 return *p_path_nec = nec;
1444 const float lower_value,
1445 const float strip_value,
1446 const float influence)
1449 if (
IS_EQF(influence, 0.0f)) {
1454 switch (blendmode) {
1457 return lower_value + (strip_value * influence);
1461 return lower_value - (strip_value * influence);
1465 return influence * (lower_value * strip_value) + (1 - influence) * lower_value;
1476 return lower_value * (1.0f - influence) + (strip_value * influence);
1484 const float lower_value,
1485 const float strip_value,
1486 const float influence)
1489 if (
IS_EQF(influence, 0.0f)) {
1497 return lower_value + (strip_value - base_value) * influence;
1500 if (
IS_EQF(base_value, 0.0f)) {
1503 return lower_value *
powf(strip_value / base_value, influence);
1513 const float lower_value,
1514 const float blended_value,
1515 const float influence,
1516 float *r_strip_value)
1519 if (
IS_EQF(influence, 0.0f)) {
1523 switch (blendmode) {
1525 *r_strip_value = (blended_value - lower_value) / influence;
1529 *r_strip_value = (lower_value - blended_value) / influence;
1533 if (
IS_EQF(lower_value, 0.0f)) {
1535 if (
IS_EQF(blended_value, 0.0f)) {
1536 *r_strip_value = 1.0f;
1553 *r_strip_value = ((blended_value - lower_value) / (influence * lower_value)) + 1.0f;
1570 *r_strip_value = (blended_value - lower_value * (1.0f - influence)) / influence;
1578 const float lower_value,
1579 const float blended_value,
1580 const float influence,
1581 float *r_strip_value)
1584 if (
IS_EQF(influence, 0.0f)) {
1591 *r_strip_value = base_value + (blended_value - lower_value) / influence;
1595 if (
IS_EQF(base_value, 0.0f)) {
1599 if (
IS_EQF(lower_value, 0.0f)) {
1601 if (
IS_EQF(blended_value, 0.0f)) {
1602 *r_strip_value = base_value;
1609 *r_strip_value = base_value *
powf(blended_value / lower_value, 1.0f / influence);
1623 const float strip_values[4],
1624 const float influence,
1625 float r_blended_value[4])
1627 float tmp_lower[4], tmp_strip_values[4];
1633 mul_qt_qtqt(r_blended_value, tmp_lower, tmp_strip_values);
1638 const float blended_values[4],
1639 const float influence,
1640 float r_strip_values[4])
1647 if (
IS_EQF(influence, 0.0f)) {
1650 float tmp_lower[4], tmp_blended[4];
1656 mul_qt_qtqt(r_strip_values, tmp_lower, tmp_blended);
1673 if (list2 && list2->
first) {
1692 fcm2 = list2->
first;
1714 fcm2 = list2->
first;
1786 if (strip ==
NULL) {
1791 CLOG_ERROR(&
LOG,
"NLA-Strip Eval Error: Strip '%s' has no Action", strip->
name);
1804 ptr, channels, &tmp_modifiers, strip->
act, strip->
strip_time, &strip_snapshot);
1821 const bool flush_to_original)
1864 ptr, channels, &tmp_modifiers, &tmp_nes, &snapshot1, anim_eval_context, flush_to_original);
1872 ptr, channels, &tmp_modifiers, &tmp_nes, &snapshot2, anim_eval_context, flush_to_original);
1895 const bool flush_to_original)
1924 ptr, channels, &tmp_modifiers, tmp_nes, snapshot, &child_context, flush_to_original);
1941 const bool flush_to_original)
1958 switch (strip->
type) {
1964 ptr, channels, modifiers, nes, snapshot, anim_eval_context, flush_to_original);
1968 ptr, channels, modifiers, nes, snapshot, anim_eval_context, flush_to_original);
1983 const bool flush_to_original)
1986 if (channels ==
NULL) {
2005 for (
int i = 0; i < nec_snapshot->
length; i++) {
2007 float value = nec_snapshot->
values[i];
2008 if (nec->is_array) {
2012 if (flush_to_original) {
2025 GSet *touched_actions)
2058 GSet *touched_actions)
2113 const bool keyframing_to_strip,
2131 if (!is_inplace_tweak) {
2140 if (keyframing_to_strip) {
2141 r_tweak_strip->
extendmode = (is_inplace_tweak &&
2150 const bool keyframing_to_strip,
2153 memset(r_action_strip, 0,
sizeof(
NlaStrip));
2162 r_action_strip->
act = action;
2169 (r_action_strip->
actstart + 1.0f) :
2170 (r_action_strip->
actend);
2189 const bool actionstrip_evaluated = r_action_strip->
act && !soloing && !tweaking;
2190 if (!actionstrip_evaluated) {
2195 if (keyframing_to_strip) {
2231 const bool any_strip_evaluated)
2237 if (any_strip_evaluated) {
2284 const bool flush_to_original)
2287 short track_index = 0;
2288 bool has_strips =
false;
2308 if (nlt == tweaked_track) {
2312 &estrips, &tweak_strip, anim_eval_context, flush_to_original);
2316 &estrips, &nlt->
strips, track_index, anim_eval_context, flush_to_original);
2333 for (nes = estrips.
first; nes; nes = nes->
next) {
2368 short track_index = 0;
2369 bool has_strips =
false;
2384 if (nlt == tweaked_track) {
2394 &lower_estrips, &nlt->
strips, track_index, anim_eval_context,
false);
2415 NULL, tweak_strip, anim_eval_context,
false);
2422 NULL, action_strip, anim_eval_context,
false);
2439 for (nes = lower_estrips.
first; nes; nes = nes->
next) {
2460 const bool flush_to_original)
2478 CLOG_WARN(&
LOG,
"NLA Eval: Stopgap for active action on NLA Stack - no strips case");
2492 for (
int i = 0; i < snapshot->
size; i++) {
2520 const short upper_blendmode,
2521 const float upper_influence,
2526 const bool zero_upper_influence =
IS_EQF(upper_influence, 0.0f);
2529 const int length = nec->base_snapshot.length;
2533 if (upper_necs ==
NULL && lower_necs ==
NULL) {
2538 if (lower_necs ==
NULL) {
2548 if (upper_necs ==
NULL || zero_upper_influence) {
2553 const int mix_mode = nec->mix_mode;
2563 for (
int j = 0; j <
length; j++) {
2569 nec->base_snapshot.values[j],
2577 for (
int j = 0; j <
length; j++) {
2583 upper_blendmode, lower_necs->
values[j], upper_necs->
values[j], upper_influence);
2623 ctx =
MEM_callocN(
sizeof(*ctx),
"NlaKeyframingContext");
2656 if (r_force_all !=
NULL) {
2657 *r_force_all =
false;
2671 int blend_mode =
context->strip.blendmode;
2672 float influence =
context->strip.influence;
2679 if (influence <= 0.0f) {
2706 float *lower_values = lower_nec_snapshot->
values;
2711 if (r_force_all ==
NULL) {
2715 *r_force_all =
true;
2718 lower_values, values, influence, values)) {
2725 for (
int i = 0; i <
count; i++) {
2726 if (
ELEM(index, i, -1)) {
2740 for (
int i = 0; i <
count; i++) {
2741 if (
ELEM(index, i, -1)) {
2743 blend_mode, lower_values[i], values[i], influence, &values[i])) {
2831 const bool flush_to_original)
2892 printf(
"Evaluate all animation - %f\n", ctime);
2904 #define EVAL_ANIM_IDS(first, aflag) \
2905 for (id = first; id; id = id->next) { \
2906 if (ID_REAL_USERS(id) > 0) { \
2907 AnimData *adt = BKE_animdata_from_id(id); \
2908 BKE_animsys_evaluate_animdata(id, adt, &anim_eval_context, aflag, flush_to_original); \
2919 #define EVAL_ANIM_NODETREE_IDS(first, NtId_Type, aflag) \
2920 for (id = first; id; id = id->next) { \
2921 if (ID_REAL_USERS(id) > 0) { \
2922 AnimData *adt = BKE_animdata_from_id(id); \
2923 NtId_Type *ntp = (NtId_Type *)id; \
2924 if (ntp->nodetree) { \
2925 AnimData *adt2 = BKE_animdata_from_id((ID *)ntp->nodetree); \
2926 BKE_animsys_evaluate_animdata( \
2927 &ntp->nodetree->id, adt2, &anim_eval_context, ADT_RECALC_ANIM, flush_to_original); \
2929 BKE_animsys_evaluate_animdata(id, adt, &anim_eval_context, aflag, flush_to_original); \
2944 printf(
"\tNo Actions, so no animation needs to be evaluated...\n");
3065 int driver_index = 0;
3127 for (; dvar_orig && dvar; dvar_orig = dvar_orig->
next, dvar = dvar->
next) {
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
void calc_action_range(const struct bAction *act, float *start, float *end, short incl_modifiers)
struct AnimData * BKE_animdata_from_id(struct ID *id)
float evaluate_fcurve(struct FCurve *fcu, float evaltime)
float calculate_fcurve(struct PathResolvedRNA *anim_rna, struct FCurve *fcu, const struct AnimationEvalContext *anim_eval_context)
bool BKE_fcurve_is_empty(struct FCurve *fcu)
void evaluate_value_fmodifiers(FModifiersStackStorage *storage, ListBase *modifiers, struct FCurve *fcu, float *cvalue, float evaltime)
float evaluate_time_fmodifiers(FModifiersStackStorage *storage, ListBase *modifiers, struct FCurve *fcu, float cvalue, float evaltime)
uint evaluate_fmodifiers_storage_size_per_modifier(ListBase *modifiers)
#define BKE_LIB_FOREACHID_PROCESS_ID(_data, _id, _cb_flag)
General operations, lookup, etc. for materials.
void BKE_nlastrip_recalculate_bounds_sync_action(struct NlaStrip *strip)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
#define BLI_BITMAP_SIZE(_tot)
#define BLI_BITMAP_TEST_BOOL(_bitmap, _index)
#define BLI_BITMAP_NEW(_tot, _alloc_string)
void BLI_bitmap_set_all(BLI_bitmap *bitmap, bool set, size_t bits)
A dynamically sized string ADT.
unsigned int BLI_ghashutil_ptrhash(const void *key)
GHash * BLI_ghash_str_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_ptr_new(const char *info)
GHash * BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
bool BLI_gset_add(GSet *gs, void *key)
bool BLI_ghash_ensure_p_ex(GHash *gh, const void *key, void ***r_key, void ***r_val) ATTR_WARN_UNUSED_RESULT
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void void void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void invert_qt_normalized(float q[4])
float normalize_qt_qt(float r[4], const float q[4])
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void pow_qt_fl_normalized(float q[4], const float f)
MINLINE void zero_v4(float r[4])
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t len)
#define IN_RANGE_INCL(a, b, c)
#define BLO_read_data_address(reader, ptr_p)
#define BLO_write_struct(writer, struct_name, data_ptr)
void BLO_read_list(BlendDataReader *reader, struct ListBase *list)
void BLO_write_string(BlendWriter *writer, const char *data_ptr)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
struct Depsgraph Depsgraph
bool DEG_is_active(const struct Depsgraph *depsgraph)
void DEG_debug_print_eval_time(struct Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, float time)
void DEG_debug_print_eval_subdata_index(struct Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, const char *subdata_comment, const char *subdata_name, const void *subdata_address, const int subdata_index)
float DEG_get_ctime(const Depsgraph *graph)
#define MAX_DRIVER_TARGETS
@ NLASTRIP_FLAG_USR_INFLUENCE
@ NLASTRIP_FLAG_USR_TIME_CYCLIC
@ NLASTRIP_FLAG_NO_TIME_MAP
@ NLASTRIP_FLAG_EDIT_TOUCHED
@ NLASTRIP_FLAG_SYNC_LENGTH
@ NLASTRIP_EXTEND_NOTHING
@ NLASTRIP_TYPE_TRANSITION
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
static void nlaeval_init(NlaEvalData *nlaeval)
void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache)
static float nla_combine_value(const int mix_mode, float base_value, const float lower_value, const float strip_value, const float influence)
static void animsys_evaluate_fcurves(PointerRNA *ptr, ListBase *list, const AnimationEvalContext *anim_eval_context, bool flush_to_original)
void nlasnapshot_enable_all_blend_domain(NlaEvalSnapshot *snapshot)
void BKE_animsys_evaluate_animdata(ID *id, AnimData *adt, const AnimationEvalContext *anim_eval_context, eAnimData_Recalc recalc, const bool flush_to_original)
static void animsys_write_orig_anim_rna(PointerRNA *ptr, const char *rna_path, int array_index, float value)
static void nlastrip_evaluate_meta(PointerRNA *ptr, NlaEvalData *channels, ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
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)
static bool is_action_track_evaluated_without_nla(const AnimData *adt, const bool any_strip_evaluated)
static NlaEvalChannelSnapshot * nlaeval_snapshot_find_channel(NlaEvalSnapshot *snapshot, NlaEvalChannel *nec)
static NlaTrack * nlatrack_find_tweaked(const AnimData *adt)
void BKE_animsys_evaluate_all_animation(Main *main, Depsgraph *depsgraph, float ctime)
void BKE_keyingsets_copy(ListBase *newlist, const ListBase *list)
static bool is_nlatrack_evaluatable(const AnimData *adt, const NlaTrack *nlt)
static void nlaevalchan_free_data(NlaEvalChannel *nec)
static void nlavalidmask_free(NlaValidMask *mask)
void nlasnapshot_ensure_channels(NlaEvalData *eval_data, NlaEvalSnapshot *snapshot)
static void animsys_create_action_track_strip(const AnimData *adt, const bool keyframing_to_strip, NlaStrip *r_action_strip)
static void nlavalidmask_init(NlaValidMask *mask, int bits)
static float nla_blend_value(const int blendmode, const float lower_value, const float strip_value, const float influence)
bool BKE_animsys_rna_path_resolve(PointerRNA *ptr, const char *rna_path, const int array_index, PathResolvedRNA *r_result)
static NlaEvalChannelSnapshot * nlaeval_snapshot_get(NlaEvalSnapshot *snapshot, int index)
static NlaEvalChannel * nlaevalchan_verify(PointerRNA *ptr, NlaEvalData *nlaeval, const char *path)
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time)
static NlaEvalStrip * nlastrips_ctime_get_strip_single(ListBase *dst_list, NlaStrip *single_strip, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
static void nlaeval_fmodifiers_join_stacks(ListBase *result, ListBase *list1, ListBase *list2)
void BKE_keyingset_free_path(KeyingSet *ks, KS_Path *ksp)
void nlasnapshot_blend(NlaEvalData *eval_data, NlaEvalSnapshot *lower_snapshot, NlaEvalSnapshot *upper_snapshot, const short upper_blendmode, const float upper_influence, NlaEvalSnapshot *r_blended_snapshot)
static uint nlaevalchan_keyhash(const void *ptr)
void BKE_keyingsets_blend_read_expand(BlendExpander *expander, ListBase *list)
void BKE_animsys_eval_animdata(Depsgraph *depsgraph, ID *id)
static bool nla_combine_get_inverted_strip_value(const int mix_mode, float base_value, const float lower_value, const float blended_value, const float influence, float *r_strip_value)
static NlaEvalChannel * nlaevalchan_verify_key(NlaEvalData *nlaeval, const char *path, NlaEvalChannelKey *key)
static void nlaevalchan_get_default_values(NlaEvalChannel *nec, float *r_values)
#define EVAL_ANIM_IDS(first, aflag)
static bool nlaevalchan_validate_index_ex(const NlaEvalChannel *nec, const int array_index)
static void animsys_evaluate_overrides(PointerRNA *ptr, AnimData *adt)
static void nlaevalchan_snapshot_copy(NlaEvalChannelSnapshot *dst, const NlaEvalChannelSnapshot *src)
KS_Path * BKE_keyingset_find_path(KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, int UNUSED(group_mode))
void BKE_keyingsets_blend_write(BlendWriter *writer, ListBase *list)
static void animsys_calculate_nla(PointerRNA *ptr, AnimData *adt, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
bool BKE_animsys_read_from_rna_path(PathResolvedRNA *anim_rna, float *r_value)
static bool is_fcurve_evaluatable(FCurve *fcu)
void animsys_evaluate_action_group(PointerRNA *ptr, bAction *act, bActionGroup *agrp, const AnimationEvalContext *anim_eval_context)
static void nlastrip_evaluate_transition(PointerRNA *ptr, NlaEvalData *channels, ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
NlaKeyframingContext * BKE_animsys_get_nla_keyframing_context(struct ListBase *cache, struct PointerRNA *ptr, struct AnimData *adt, const AnimationEvalContext *anim_eval_context)
void animsys_evaluate_action(PointerRNA *ptr, bAction *act, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
void nlastrip_evaluate(PointerRNA *ptr, NlaEvalData *channels, ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
static int nlaevalchan_validate_index(const NlaEvalChannel *nec, int index)
static void nla_eval_domain_action(PointerRNA *ptr, NlaEvalData *channels, bAction *act, GSet *touched_actions)
static bool nla_blend_get_inverted_strip_value(const int blendmode, const float lower_value, const float blended_value, const float influence, float *r_strip_value)
NlaEvalStrip * nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short index, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
static void nlastrip_evaluate_actionclip(PointerRNA *ptr, NlaEvalData *channels, ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot)
static void nlaeval_snapshot_ensure_size(NlaEvalSnapshot *snapshot, int size)
void BKE_keyingsets_blend_read_data(BlendDataReader *reader, ListBase *list)
#define ANIMSYS_FLOAT_AS_BOOL(value)
void BKE_keyingset_free(KeyingSet *ks)
#define EVAL_ANIM_NODETREE_IDS(first, NtId_Type, aflag)
static void nla_combine_quaternion(const float lower_values[4], const float strip_values[4], const float influence, float r_blended_value[4])
void BKE_animsys_update_driver_array(ID *id)
KeyingSet * BKE_keyingset_add(ListBase *list, const char idname[], const char name[], short flag, short keyingflag)
static NlaEvalChannelSnapshot * nlaeval_snapshot_ensure_channel(NlaEvalSnapshot *snapshot, NlaEvalChannel *nec)
static bool nla_combine_quaternion_get_inverted_strip_values(const float lower_values[4], const float blended_values[4], const float influence, float r_strip_values[4])
static void nlaeval_snapshot_init(NlaEvalSnapshot *snapshot, NlaEvalData *nlaeval, NlaEvalSnapshot *base)
static void nlaeval_snapshot_free_data(NlaEvalSnapshot *snapshot)
static void nlaeval_free(NlaEvalData *nlaeval)
KS_Path * BKE_keyingset_add_path(KeyingSet *ks, ID *id, const char group_name[], const char rna_path[], int array_index, short flag, short groupmode)
static NlaEvalChannelSnapshot ** nlaeval_snapshot_ensure_slot(NlaEvalSnapshot *snapshot, NlaEvalChannel *nec)
static float nlastrip_get_influence(NlaStrip *strip, float cframe)
static bool animsys_evaluate_nla_for_flush(NlaEvalData *echannels, PointerRNA *ptr, const AnimData *adt, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
static bool nlaevalchan_keycmp(const void *a, const void *b)
static void nlasnapshot_from_action(PointerRNA *ptr, NlaEvalData *channels, ListBase *modifiers, bAction *action, const float evaltime, NlaEvalSnapshot *r_snapshot)
void BKE_animsys_eval_driver(Depsgraph *depsgraph, ID *id, int driver_index, FCurve *fcu_orig)
void BKE_keyingsets_foreach_id(LibraryForeachIDData *data, const ListBase *keyingsets)
static void animsys_create_tweak_strip(const AnimData *adt, const bool keyframing_to_strip, NlaStrip *r_tweak_strip)
static void nlaevalchan_snapshot_free(NlaEvalChannelSnapshot *nec_snapshot)
void nladata_flush_channels(PointerRNA *ptr, NlaEvalData *channels, NlaEvalSnapshot *snapshot, const bool flush_to_original)
static void action_idcode_patch_check(ID *id, bAction *act)
static void nlaeval_fmodifiers_split_stacks(ListBase *list1, ListBase *list2)
static char nlaevalchan_detect_mix_mode(NlaEvalChannelKey *key, int length)
static NlaEvalChannelSnapshot * nlaevalchan_snapshot_new(NlaEvalChannel *nec)
static bool animsys_construct_orig_pointer_rna(const PointerRNA *ptr, PointerRNA *ptr_orig)
static void animsys_evaluate_drivers(PointerRNA *ptr, AnimData *adt, const AnimationEvalContext *anim_eval_context)
static void animsys_evaluate_nla_domain(PointerRNA *ptr, NlaEvalData *channels, AnimData *adt)
static void animsys_evaluate_nla_for_keyframing(PointerRNA *ptr, const AnimData *adt, const AnimationEvalContext *anim_eval_context, NlaKeyframingContext *r_context)
static void nla_eval_domain_strips(PointerRNA *ptr, NlaEvalData *channels, ListBase *strips, GSet *touched_actions)
static void nlastrip_evaluate_controls(NlaStrip *strip, const AnimationEvalContext *anim_eval_context, const bool flush_to_original)
AnimationEvalContext BKE_animsys_eval_context_construct_at(const AnimationEvalContext *anim_eval_context, float eval_time)
bool BKE_animsys_write_to_rna_path(PathResolvedRNA *anim_rna, const float value)
void BKE_keyingsets_free(ListBase *list)
void BKE_keyingsets_blend_read_lib(BlendLibReader *reader, ID *id, ListBase *list)
Provides wrapper around system-specific atomic primitives, and some extensions (faked-atomic operatio...
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
const Depsgraph * depsgraph
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_recallocN_id)(void *vmemh, size_t len, const char *str)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
int main(int argc, char **argv)
float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode)
struct NlaEvalChannelSnapshot NlaEvalChannelSnapshot
@ NES_TIME_TRANSITION_END
@ NES_TIME_TRANSITION_START
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_get_default_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, bool value)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
bool RNA_property_array_check(PropertyRNA *prop)
bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value)
int RNA_property_float_clamp(PointerRNA *ptr, PropertyRNA *prop, float *value)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value)
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
PropertyType RNA_property_type(PropertyRNA *prop)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
bool RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_get_default_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_enum_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
int RNA_property_flag(PropertyRNA *prop)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
int RNA_property_int_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_int_get_default_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
bool RNA_path_resolve_property(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
struct SELECTID_Context context
struct AnimOverride * next
struct Depsgraph * depsgraph
struct PropertyRNA * prop
NlaValidMask blend_domain
struct NlaEvalChannel * channel
struct NlaEvalData * owner
NlaEvalChannelSnapshot base_snapshot
NlaEvalSnapshot eval_snapshot
NlaEvalSnapshot base_snapshot
struct NlaEvalSnapshot * base
NlaEvalChannelSnapshot ** channels
struct NlaEvalStrip * next
NlaEvalData lower_eval_data
NlaEvalStrip * eval_strip
struct NlaStrip * orig_strip
struct PropertyRNA * prop
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)