44 #define SMALL -1.0e-10
99 for (fcu = list->
first; fcu; fcu = fcn) {
159 for (sfcu =
src->first; sfcu; sfcu = sfcu->
next) {
169 if (driver !=
NULL) {
235 bool is_driven =
false;
238 if (r_driven !=
NULL) {
239 *r_driven = is_driven;
254 if (
ELEM(
NULL, list, rna_path) || (array_index < 0)) {
259 for (fcu = list->
first; fcu; fcu = fcu->
next) {
282 if (
ELEM(
NULL, fcu_iter, rna_path)) {
287 for (fcu = fcu_iter; fcu; fcu = fcu->
next) {
306 if ((dataPrefix[0] == 0) || (dataName[0] == 0)) {
310 const size_t quotedName_size = strlen(dataName) + 1;
311 char *quotedName = alloca(quotedName_size);
314 for (fcu =
src->first; fcu; fcu = fcu->
next) {
323 if (!
STREQ(quotedName, dataName)) {
340 AnimData *animdata,
const char *rna_path,
int rna_index,
bAction **r_action,
bool *r_driven)
342 if (r_driven !=
NULL) {
345 if (r_action !=
NULL) {
349 const bool has_action_fcurves = animdata->
action !=
NULL &&
354 if (has_action_fcurves) {
358 if (r_action !=
NULL) {
359 *r_action = animdata->
action;
370 if (r_driven !=
NULL) {
389 NULL,
ptr, prop, rnaindex, r_adt, r_action, r_driven, r_special);
401 if (r_animdata !=
NULL) {
404 if (r_action !=
NULL) {
407 if (r_driven !=
NULL) {
449 if (rna_path ==
NULL) {
456 if (fcu !=
NULL && r_animdata !=
NULL) {
480 int start = 0, end = arraylen;
481 int loopbreaker = 0, maxloop = arraylen * 2;
490 if ((arraylen <= 0) || (
array ==
NULL)) {
499 framenum =
array[0].vec[1][0];
504 if (frame < framenum) {
509 framenum =
array[(arraylen - 1)].vec[1][0];
512 return (arraylen - 1);
514 if (frame > framenum) {
521 for (loopbreaker = 0; (start <= end) && (loopbreaker < maxloop); loopbreaker++) {
525 int mid = start + ((end - start) / 2);
527 float midfra =
array[mid].vec[1][0];
536 if (frame > midfra) {
539 else if (frame < midfra) {
545 if (loopbreaker == (maxloop - 1)) {
550 "\tround = %d: start = %d, end = %d, arraylen = %d",
577 const bool do_sel_only)
596 for (
int i = 0; i < fcu->
totvert; bezt++, i++) {
606 for (
int i = 0; i < fcu->
totvert; bezt--, i++) {
629 const bool do_sel_only,
630 const bool include_handles)
632 float xminv = 999999999.0f, xmaxv = -999999999.0f;
633 float yminv = 999999999.0f, ymaxv = -999999999.0f;
634 bool foundvert =
false;
647 if (include_handles) {
648 xminv =
min_fff(xminv, bezt_first->
vec[0][0], bezt_first->
vec[1][0]);
649 xmaxv =
max_fff(xmaxv, bezt_last->vec[1][0], bezt_last->vec[2][0]);
652 xminv =
min_ff(xminv, bezt_first->
vec[1][0]);
653 xmaxv =
max_ff(xmaxv, bezt_last->vec[1][0]);
663 for (bezt = fcu->
bezt, i = 0; i < fcu->totvert; prevbezt = bezt, bezt++, i++) {
669 if (include_handles) {
702 for (fpt = fcu->
fpt, i = 0; i < fcu->totvert; fpt++, i++) {
703 if (fpt->
vec[1] < yminv) {
706 if (fpt->
vec[1] > ymaxv) {
733 printf(
"F-Curve calc bounds didn't find anything, so assuming minimum bounds of 1.0\n");
755 FCurve *fcu,
float *start,
float *end,
const bool do_sel_only,
const bool do_min_length)
757 float min = 999999999.0f,
max = -999999999.0f;
758 bool foundvert =
false;
784 if (foundvert ==
false) {
802 int fcurve_array_len,
803 const float interval,
808 const double interval_db =
max_ff(interval, 1e-3f);
810 for (
int fcurve_index = 0; fcurve_index < fcurve_array_len; fcurve_index++) {
811 const FCurve *fcu = fcurve_array[fcurve_index];
812 for (
int i = 0; i < fcu->
totvert; i++) {
814 const double value = round((
double)bezt->
vec[1][0] / interval_db);
815 BLI_assert(value > INT_MIN && value < INT_MAX);
821 float *frames =
MEM_mallocN(
sizeof(*frames) * frames_len, __func__);
827 frames[i] = (
double)value * interval_db;
832 *r_frames_len = frames_len;
837 int fcurve_array_len,
851 if (active_bezt ==
NULL) {
859 if (offset < 0 || offset >= fcu->
totvert) {
876 (active_keyframe_index < 0)) {
880 const BezTriple *active_bezt = &fcu->
bezt[active_keyframe_index];
881 if (((active_bezt->
f1 | active_bezt->
f2 | active_bezt->
f3) &
SELECT) == 0) {
886 return active_keyframe_index;
893 const float value_delta = new_value - keyframe->
vec[1][1];
894 keyframe->
vec[0][1] += value_delta;
895 keyframe->
vec[1][1] = new_value;
896 keyframe->
vec[2][1] += value_delta;
994 for (ce = lb->first; ce; ce = ce->
next) {
1003 if (ce->
cfra > bezt->vec[1][0]) {
1017 cen->
cfra = bezt->vec[1][0];
1018 cen->
sel = bezt->f2;
1045 CLOG_ERROR(&
LOG,
"No F-Curve with F-Curve Modifiers to Bake");
1049 CLOG_ERROR(&
LOG,
"Error: Frame range for Sampled F-Curve creation is inappropriate");
1054 fpt = new_fpt =
MEM_callocN(
sizeof(
FPoint) * (end - start + 1),
"FPoint Samples");
1057 for (cfra = start; cfra <= end; cfra++, fpt++) {
1059 fpt->
vec[1] = sample_cb(fcu,
data, (
float)cfra);
1073 fcu->
totvert = end - start + 1;
1090 CLOG_ERROR(&
LOG,
"No F-Curve with F-Curve Modifiers to Un-Bake");
1095 CLOG_ERROR(&
LOG,
"Error: Frame range to unbake F-Curve is inappropriate");
1101 CLOG_ERROR(&
LOG,
"Error: Curve contains no baked keyframes");
1112 int keyframes_to_insert = end - start;
1113 int sample_points = fcu->
totvert;
1115 bezt = fcu->
bezt =
MEM_callocN(
sizeof(*fcu->
bezt) * (
size_t)keyframes_to_insert, __func__);
1116 fcu->
totvert = keyframes_to_insert;
1119 for (; sample_points && (fpt->
vec[0] < start); fpt++, sample_points--) {
1124 int cur_pos = start;
1127 for (; keyframes_to_insert && (fpt->
vec[0] > start); cur_pos++, bezt++, keyframes_to_insert--) {
1130 bezt->
vec[1][1] = fpt->
vec[1];
1134 for (; keyframes_to_insert && sample_points;
1135 cur_pos++, bezt++, keyframes_to_insert--, fpt++, sample_points--) {
1141 for (fpt--; keyframes_to_insert; cur_pos++, bezt++, keyframes_to_insert--) {
1144 bezt->
vec[1][1] = fpt->
vec[1];
1177 if (
data &&
data->after_cycles == 0 &&
data->before_cycles == 0) {
1213 for (
int i = 0; i < 3; i++) {
1248 if (bezt->
vec[0][0] > bezt->
vec[1][0]) {
1249 bezt->
vec[0][0] = bezt->
vec[1][0];
1251 if (bezt->
vec[2][0] < bezt->
vec[1][0]) {
1252 bezt->
vec[2][0] = bezt->
vec[1][0];
1264 bezt->
vec[0][1] = bezt->
vec[2][1] = bezt->
vec[1][1];
1292 first->
vec[0][1] = first->
vec[2][1] = first->
vec[1][1];
1293 last->vec[0][1] = last->vec[2][1] = last->vec[1][1];
1319 for (
a = 0, bezt = fcu->
bezt; a < fcu->totvert;
a++, bezt++) {
1343 for (
a = 0, bezt = fcu->
bezt; a < fcu->totvert;
a++, bezt++) {
1347 if (bezt->
vec[1][0] > (bezt + 1)->vec[1][0]) {
1355 for (
a = 0, bezt = fcu->
bezt; a < fcu->totvert;
a++, bezt++) {
1357 if ((bezt->
vec[0][0] > bezt->
vec[1][0]) && (bezt->
vec[2][0] < bezt->
vec[1][0])) {
1383 for (
a = 0, bezt = fcu->
bezt;
a < (fcu->
totvert - 1);
a++, bezt++) {
1384 if (bezt->
vec[1][0] > (bezt + 1)->vec[1][0]) {
1389 else if (fcu->
fpt) {
1393 for (
a = 0, fpt = fcu->
fpt;
a < (fcu->
totvert - 1);
a++, fpt++) {
1394 if (fpt->
vec[0] > (fpt + 1)->vec[0]) {
1412 float h1[2], h2[2], len1, len2,
len, fac;
1415 h1[0] =
v1[0] -
v2[0];
1416 h1[1] =
v1[1] -
v2[1];
1418 h2[0] = v4[0] - v3[0];
1419 h2[1] = v4[1] - v3[1];
1426 len = v4[0] -
v1[0];
1427 len1 =
fabsf(h1[0]);
1428 len2 =
fabsf(h2[0]);
1431 if ((len1 + len2) == 0.0f) {
1439 v2[0] = (
v1[0] - fac * h1[0]);
1440 v2[1] = (
v1[1] - fac * h1[1]);
1445 v3[0] = (v4[0] - fac * h2[0]);
1446 v3[1] = (v4[1] - fac * h2[1]);
1456 static int solve_cubic(
double c0,
double c1,
double c2,
double c3,
float *o)
1458 double a,
b,
c, p, q, d,
t, phi;
1468 q = (2 *
a *
a *
a -
a *
b +
c) / 2;
1469 d = q * q + p * p * p;
1475 if ((o[0] >= (
float)
SMALL) && (o[0] <= 1.000001f)) {
1485 if ((o[0] >= (
float)
SMALL) && (o[0] <= 1.000001f)) {
1490 if ((o[nr] >= (
float)
SMALL) && (o[nr] <= 1.000001f)) {
1496 phi =
acos(-q /
sqrt(-(p * p * p)));
1499 q =
sqrt(3 - 3 * p * p);
1500 o[0] = (
float)(2 *
t * p -
a);
1502 if ((o[0] >= (
float)
SMALL) && (o[0] <= 1.000001f)) {
1505 o[nr] = (
float)(-
t * (p + q) -
a);
1507 if ((o[nr] >= (
float)
SMALL) && (o[nr] <= 1.000001f)) {
1510 o[nr] = (
float)(-
t * (p - q) -
a);
1512 if ((o[nr] >= (
float)
SMALL) && (o[nr] <= 1.000001f)) {
1523 p =
b *
b - 4 *
a *
c;
1527 o[0] = (
float)((-
b - p) / (2 *
a));
1529 if ((o[0] >= (
float)
SMALL) && (o[0] <= 1.000001f)) {
1532 o[nr] = (
float)((-
b + p) / (2 *
a));
1534 if ((o[nr] >= (
float)
SMALL) && (o[nr] <= 1.000001f)) {
1542 if ((o[0] >= (
float)
SMALL) && (o[0] <= 1.000001f)) {
1553 if ((o[0] >= (
float)
SMALL) && (o[0] <= 1.000001f)) {
1568 static int findzero(
float x,
float q0,
float q1,
float q2,
float q3,
float *o)
1570 const double c0 = q0 -
x;
1571 const double c1 = 3.0f * (
q1 - q0);
1572 const double c2 = 3.0f * (q0 - 2.0f *
q1 + q2);
1573 const double c3 = q3 - q0 + 3.0f * (
q1 - q2);
1578 static void berekeny(
float f1,
float f2,
float f3,
float f4,
float *o,
int b)
1580 float t, c0, c1, c2, c3;
1584 c1 = 3.0f * (f2 - f1);
1585 c2 = 3.0f * (f1 - 2.0f * f2 + f3);
1586 c3 = f4 - f1 + 3.0f * (f2 - f3);
1588 for (
a = 0;
a <
b;
a++) {
1590 o[
a] = c0 +
t * c1 +
t *
t * c2 +
t *
t *
t * c3;
1606 const float *prev_coords =
prev->vec[1];
1607 float *prev_handle_right =
prev->vec[2];
1608 float *next_handle_left =
next->vec[0];
1609 const float *next_coords =
next->vec[1];
1611 float *new_handle_left = bezt->
vec[0];
1612 const float *new_coords = bezt->
vec[1];
1613 float *new_handle_right = bezt->
vec[2];
1615 if (new_coords[0] <= prev_coords[0] || new_coords[0] >= next_coords[0]) {
1625 prev_handle_right[0],
1626 next_handle_left[0],
1632 const float t = roots[0];
1633 if (t <= 0.0f || t >= 1.0f) {
1640 float split1[3][2], split2[2][2], split3[2];
1652 float diff_coords[2];
1654 add_v2_v2v2(new_handle_left, split2[0], diff_coords);
1655 add_v2_v2v2(new_handle_right, split2[1], diff_coords);
1657 *r_pdelta = diff_coords[1];
1692 bool changed =
false;
1699 for (
int i = 0; i < fcu->
totvert; i++) {
1733 BezTriple *endpoint_bezt = bezts + endpoint_offset;
1734 BezTriple *neighbor_bezt = endpoint_bezt +
1735 direction_to_neighbor;
1741 return endpoint_bezt->
vec[1][1];
1747 return endpoint_bezt->
vec[1][1];
1751 float fac = neighbor_bezt->
vec[1][0] - endpoint_bezt->
vec[1][0];
1755 return endpoint_bezt->
vec[1][1];
1758 fac = (neighbor_bezt->
vec[1][1] - endpoint_bezt->
vec[1][1]) / fac;
1759 return endpoint_bezt->
vec[1][1] - (fac * dx);
1764 int handle = direction_to_neighbor > 0 ? 0 : 2;
1766 float fac = endpoint_bezt->
vec[1][0] - endpoint_bezt->
vec[handle][0];
1770 return endpoint_bezt->
vec[1][1];
1773 fac = (endpoint_bezt->
vec[1][1] - endpoint_bezt->
vec[handle][1]) / fac;
1774 return endpoint_bezt->
vec[1][1] - (fac * dx);
1779 const float eps = 1.e-8f;
1803 return bezt->
vec[1][1];
1809 prevbezt = (
a > 0) ? (bezt - 1) : bezt;
1814 return bezt->
vec[1][1];
1817 if (evaltime < prevbezt->vec[1][0] || bezt->
vec[1][0] <
evaltime) {
1819 printf(
" ERROR: failed eval - p=%f b=%f, t=%f (%f)\n",
1820 prevbezt->
vec[1][0],
1829 const float begin = prevbezt->
vec[1][1];
1830 const float change = bezt->
vec[1][1] - prevbezt->
vec[1][1];
1831 const float duration = bezt->
vec[1][0] - prevbezt->
vec[1][0];
1833 const float amplitude = prevbezt->
amplitude;
1834 const float period = prevbezt->
period;
1840 return prevbezt->
vec[1][1];
1843 switch (prevbezt->
ipo) {
1846 float v1[2],
v2[2], v3[2], v4[2], opl[32];
1850 v1[0] = prevbezt->
vec[1][0];
1851 v1[1] = prevbezt->
vec[1][1];
1852 v2[0] = prevbezt->
vec[2][0];
1853 v2[1] = prevbezt->
vec[2][1];
1855 v3[0] = bezt->
vec[0][0];
1856 v3[1] = bezt->
vec[0][1];
1857 v4[0] = bezt->
vec[1][0];
1858 v4[1] = bezt->
vec[1][1];
1860 if (
fabsf(
v1[1] - v4[1]) < FLT_EPSILON &&
fabsf(
v2[1] - v3[1]) < FLT_EPSILON &&
1861 fabsf(v3[1] - v4[1]) < FLT_EPSILON) {
1873 printf(
" ERROR: findzero() failed at %f with %f %f %f %f\n",
1892 switch (prevbezt->
easing) {
1906 switch (prevbezt->
easing) {
1920 switch (prevbezt->
easing) {
1934 switch (prevbezt->
easing) {
1948 switch (prevbezt->
easing) {
1962 switch (prevbezt->
easing) {
1976 switch (prevbezt->
easing) {
1990 switch (prevbezt->
easing) {
2004 switch (prevbezt->
easing) {
2018 switch (prevbezt->
easing) {
2032 return prevbezt->
vec[1][1];
2041 if (evaltime <= bezts->vec[1][0]) {
2056 FPoint *prevfpt, *lastfpt, *fpt;
2057 float cvalue = 0.0f;
2061 lastfpt = prevfpt + fcu->
totvert - 1;
2066 cvalue = prevfpt->
vec[1];
2070 cvalue = lastfpt->
vec[1];
2076 fpt = prevfpt + ((int)
evaltime - (
int)prevfpt->
vec[0]);
2079 if ((
t != 0.0f) && (
t < 1.0f)) {
2080 cvalue =
interpf(fpt->
vec[1], (fpt + 1)->vec[1], 1.0f -
t);
2083 cvalue = fpt->
vec[1];
2118 else if (fcu->
fpt) {
2129 cvalue =
floorf(cvalue + 0.5f);
2156 float cvalue = 0.0f;
2169 bool do_linear =
true;
2243 if (fmi && fcm->data) {
2248 switch (fcm->type) {
2253 if (
data->coefficients) {
2291 switch (fcm->type) {
2320 switch (fcm->type) {
2334 switch (fcm->type) {
2370 if (dtar->rna_path) {
2421 if (tarIndex < dvar->num_targets) {
2425 dtar->rna_path =
NULL;
2440 if (fcurves ==
NULL) {
2452 if (tarIndex < dvar->num_targets) {
typedef float(TangentPoint)[2]
struct AnimData * BKE_animdata_from_id(const struct ID *id)
void BKE_nurb_handle_calc_ex(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, eBezTriple_Flag__Alias handle_sel_flag, bool is_fcurve, char smoothing)
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt, eBezTriple_Flag__Alias sel_flag, bool use_handle, bool use_around_local)
void BKE_nurb_handle_smooth_fcurve(struct BezTriple *bezt, int total, bool cyclic)
@ FMI_TYPE_GENERATE_CURVE
void copy_fmodifiers(ListBase *dst, const ListBase *src)
const FModifierTypeInfo * fmodifier_get_typeinfo(const struct FModifier *fcm)
void evaluate_value_fmodifiers(FModifiersStackStorage *storage, ListBase *modifiers, struct FCurve *fcu, float *cvalue, float evaltime)
float(* FcuSampleFunc)(struct FCurve *fcu, void *data, float evaltime)
#define BEZT_BINARYSEARCH_THRESH
float evaluate_time_fmodifiers(FModifiersStackStorage *storage, ListBase *modifiers, struct FCurve *fcu, float cvalue, float evaltime)
bool list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype)
void free_fmodifiers(ListBase *modifiers)
uint evaluate_fmodifiers_storage_size_per_modifier(ListBase *modifiers)
#define DRIVER_TARGETS_LOOPER_BEGIN(dvar)
float evaluate_driver(struct PathResolvedRNA *anim_rna, struct ChannelDriver *driver, struct ChannelDriver *driver_orig, const struct AnimationEvalContext *anim_eval_context)
void fcurve_free_driver(struct FCurve *fcu)
#define DRIVER_TARGETS_USED_LOOPER_BEGIN(dvar)
#define DRIVER_TARGETS_LOOPER_END
struct ChannelDriver * fcurve_copy_driver(const struct ChannelDriver *driver)
void IDP_BlendWrite(struct BlendWriter *writer, const struct IDProperty *prop)
void IDP_foreach_property(struct IDProperty *id_property_root, int type_filter, IDPForeachPropertyCallback callback, void *user_data)
#define IDP_BlendDataRead(reader, prop)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(_data, _id_super, _cb_flag)
#define BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(_data, _func_call)
void BKE_lib_query_idpropertiesForeachIDLink_callback(struct IDProperty *id_prop, void *user_data)
#define BKE_LIB_FOREACHID_PROCESS_ID(_data, _id, _cb_flag)
bool BKE_nlastrip_has_curves_for_property(const struct PointerRNA *ptr, const struct PropertyRNA *prop)
#define BLI_assert_msg(a, msg)
float BLI_easing_sine_ease_in(float time, float begin, float change, float duration)
float BLI_easing_back_ease_out(float time, float begin, float change, float duration, float overshoot)
float BLI_easing_linear_ease(float time, float begin, float change, float duration)
float BLI_easing_bounce_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_quint_ease_out(float time, float begin, float change, float duration)
float BLI_easing_quart_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_circ_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_quart_ease_out(float time, float begin, float change, float duration)
float BLI_easing_bounce_ease_in(float time, float begin, float change, float duration)
float BLI_easing_circ_ease_in(float time, float begin, float change, float duration)
float BLI_easing_expo_ease_in(float time, float begin, float change, float duration)
float BLI_easing_expo_ease_out(float time, float begin, float change, float duration)
float BLI_easing_elastic_ease_in(float time, float begin, float change, float duration, float amplitude, float period)
float BLI_easing_quad_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_elastic_ease_out(float time, float begin, float change, float duration, float amplitude, float period)
float BLI_easing_cubic_ease_in(float time, float begin, float change, float duration)
float BLI_easing_elastic_ease_in_out(float time, float begin, float change, float duration, float amplitude, float period)
float BLI_easing_quint_ease_in(float time, float begin, float change, float duration)
float BLI_easing_sine_ease_out(float time, float begin, float change, float duration)
float BLI_easing_bounce_ease_out(float time, float begin, float change, float duration)
float BLI_easing_quad_ease_in(float time, float begin, float change, float duration)
float BLI_easing_quad_ease_out(float time, float begin, float change, float duration)
float BLI_easing_circ_ease_out(float time, float begin, float change, float duration)
float BLI_easing_cubic_ease_out(float time, float begin, float change, float duration)
float BLI_easing_back_ease_in(float time, float begin, float change, float duration, float overshoot)
float BLI_easing_quint_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_expo_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_quart_ease_in(float time, float begin, float change, float duration)
float BLI_easing_back_ease_in_out(float time, float begin, float change, float duration, float overshoot)
float BLI_easing_cubic_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_sine_ease_in_out(float time, float begin, float change, float duration)
#define GSET_ITER_INDEX(gs_iter_, gset_, i_)
GSet * BLI_gset_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_gset_len(const GSet *gs) ATTR_WARN_UNUSED_RESULT
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
BLI_INLINE void * BLI_gsetIterator_getKey(GSetIterator *gsi)
bool BLI_gset_add(GSet *gs, void *key)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_fff(float a, float b, float c)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
MINLINE float interpf(float a, float b, float t)
MINLINE double sqrt3d(double d)
MINLINE float min_fff(float a, float b, float c)
MINLINE void swap_v2_v2(float a[2], float b[2])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], float t)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void add_v3_v3(float r[3], const float a[3])
int BLI_sortutil_cmp_float(const void *a_, const void *b_)
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxlen)
#define UNUSED_FUNCTION(x)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define ARRAY_LAST_ITEM(arr_start, arr_dtype, arr_len)
#define BLO_read_data_address(reader, ptr_p)
void BLO_write_struct_by_name(BlendWriter *writer, const char *struct_name, const void *data_ptr)
void BLO_read_float_array(BlendDataReader *reader, int array_size, float **ptr_p)
#define BLO_write_struct(writer, struct_name, data_ptr)
void BLO_read_list(BlendDataReader *reader, struct ListBase *list)
void BLO_write_float_array(BlendWriter *writer, uint num, const float *data_ptr)
void BLO_write_string(BlendWriter *writer, const char *data_ptr)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_write_struct_array(writer, struct_name, array_size, data_ptr)
#define BLO_expand(expander, id)
#define BLO_write_struct_list(writer, struct_name, list_ptr)
typedef double(DMatrix)[4][4]
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
@ FCM_EXTRAPOLATE_CYCLIC_OFFSET
@ FMODIFIER_TYPE_FN_GENERATOR
@ FMODIFIER_TYPE_GENERATOR
@ FMODIFIER_TYPE_ENVELOPE
@ FMODIFIER_FLAG_USEINFLUENCE
@ FMODIFIER_FLAG_DISABLED
@ FMODIFIER_FLAG_RANGERESTRICT
#define FCURVE_ACTIVE_KEYFRAME_NONE
@ FCURVE_EXTRAPOLATE_CONSTANT
#define BEZT_IS_AUTOH(bezt)
#define BEZT_ISSEL_ANY(bezt)
@ HD_AUTOTYPE_LOCKED_FINAL
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
SyclQueue void void * src
float evaluate_fcurve(FCurve *fcu, float evaltime)
static BezTriple * cycle_offset_triple(bool cycle, BezTriple *out, const BezTriple *in, const BezTriple *from, const BezTriple *to)
static float fcurve_eval_samples(FCurve *fcu, FPoint *fpts, float evaltime)
float * BKE_fcurves_calc_keyed_frames_ex(FCurve **fcurve_array, int fcurve_array_len, const float interval, int *r_frames_len)
void BKE_fcurve_foreach_id(FCurve *fcu, LibraryForeachIDData *data)
bool BKE_fcurve_bezt_subdivide_handles(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, float *r_pdelta)
bool BKE_fcurve_is_protected(FCurve *fcu)
int BKE_fcurve_bezt_binarysearch_index(const BezTriple array[], const float frame, const int arraylen, bool *r_replace)
FCurve * BKE_fcurve_find(ListBase *list, const char rna_path[], const int array_index)
FCurve * BKE_fcurve_iter_step(FCurve *fcu_iter, const char rna_path[])
void testhandles_fcurve(FCurve *fcu, eBezTriple_Flag sel_flag, const bool use_handle)
int BKE_fcurve_active_keyframe_index(const FCurve *fcu)
void BKE_fcurve_handles_recalc(FCurve *fcu)
FCurve * BKE_animadata_fcurve_find_by_rna_path(AnimData *animdata, const char *rna_path, int rna_index, bAction **r_action, bool *r_driven)
bool test_time_fcurve(FCurve *fcu)
float fcurve_samplingcb_evalcurve(FCurve *fcu, void *UNUSED(data), float evaltime)
static float fcurve_eval_keyframes_extrapolate(FCurve *fcu, BezTriple *bezts, float evaltime, int endpoint_offset, int direction_to_neighbor)
bool BKE_fcurve_is_cyclic(FCurve *fcu)
void BKE_fmodifiers_blend_read_lib(BlendLibReader *reader, ID *id, ListBase *fmodifiers)
void BKE_fcurve_blend_read_data(BlendDataReader *reader, ListBase *fcurves)
static float evaluate_fcurve_ex(FCurve *fcu, float evaltime, float cvalue)
static float fcurve_eval_keyframes_interpolate(FCurve *fcu, BezTriple *bezts, float evaltime)
static void UNUSED_FUNCTION() bezt_add_to_cfra_elem(ListBase *lb, BezTriple *bezt)
static void berekeny(float f1, float f2, float f3, float f4, float *o, int b)
void BKE_fcurve_keyframe_move_value_with_handles(struct BezTriple *keyframe, const float new_value)
void BKE_fcurve_handles_recalc_ex(FCurve *fcu, eBezTriple_Flag handle_sel_flag)
bool BKE_fcurve_is_keyframable(FCurve *fcu)
bool BKE_fcurve_calc_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, const bool do_sel_only, const bool include_handles)
bool BKE_fcurve_are_keyframes_usable(FCurve *fcu)
bool BKE_fcurve_delete_keys_selected(FCurve *fcu)
FCurve * BKE_fcurve_copy(const FCurve *fcu)
void BKE_fmodifiers_blend_write(BlendWriter *writer, ListBase *fmodifiers)
static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple **last, const bool do_sel_only)
static int solve_cubic(double c0, double c1, double c2, double c3, float *o)
float * BKE_fcurves_calc_keyed_frames(FCurve **fcurve_array, int fcurve_array_len, int *r_frames_len)
int BKE_fcurves_filter(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName)
static int findzero(float x, float q0, float q1, float q2, float q3, float *o)
FCurve * BKE_fcurve_find_by_rna(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **r_adt, bAction **r_action, bool *r_driven, bool *r_special)
eFCU_Cycle_Type BKE_fcurve_get_cycle_type(FCurve *fcu)
float evaluate_fcurve_driver(PathResolvedRNA *anim_rna, FCurve *fcu, ChannelDriver *driver_orig, const AnimationEvalContext *anim_eval_context)
void BKE_fcurve_blend_read_expand(BlendExpander *expander, ListBase *fcurves)
void BKE_fcurve_active_keyframe_set(FCurve *fcu, const BezTriple *active_bezt)
static void fcurve_bezt_free(FCurve *fcu)
void BKE_fmodifiers_blend_read_data(BlendDataReader *reader, ListBase *fmodifiers, FCurve *curve)
float evaluate_fcurve_only_curve(FCurve *fcu, float evaltime)
bool BKE_fcurve_calc_range(FCurve *fcu, float *start, float *end, const bool do_sel_only, const bool do_min_length)
void BKE_fcurve_blend_write(BlendWriter *writer, ListBase *fcurves)
void BKE_fcurves_free(ListBase *list)
FCurve * BKE_fcurve_create(void)
void BKE_fcurves_copy(ListBase *dst, ListBase *src)
static void init_unbaked_bezt_data(BezTriple *bezt)
float calculate_fcurve(PathResolvedRNA *anim_rna, FCurve *fcu, const AnimationEvalContext *anim_eval_context)
void BKE_fcurve_free(FCurve *fcu)
void BKE_fcurve_blend_read_lib(BlendLibReader *reader, ID *id, ListBase *fcurves)
void sort_time_fcurve(FCurve *fcu)
void BKE_fmodifiers_blend_read_expand(BlendExpander *expander, ListBase *fmodifiers)
void fcurve_samples_to_keyframes(FCurve *fcu, const int start, const int end)
FCurve * id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *prop_name, int index, bool *r_driven)
bool BKE_fcurve_is_empty(FCurve *fcu)
static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime)
void fcurve_store_samples(FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
FCurve * BKE_fcurve_find_by_rna_context_ui(bContext *UNUSED(C), const PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **r_animdata, bAction **r_action, bool *r_driven, bool *r_special)
void BKE_fcurve_correct_bezpart(const float v1[2], float v2[2], float v3[2], const float v4[2])
void BKE_fcurve_delete_key(FCurve *fcu, int index)
static int BKE_fcurve_bezt_binarysearch_index_ex(const BezTriple array[], const float frame, const int arraylen, const float threshold, bool *r_replace)
void BKE_fcurve_delete_keys_all(FCurve *fcu)
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
SymEdge< T > * prev(const SymEdge< T > *se)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool RNA_property_animateable(const PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
char * RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
struct ExprPyLike_Parsed * expr_simple
int active_keyframe_index