44 const float *range =
static_cast<const float *
>(t->
custom.
mode.
data);
45 float minx = range[0];
46 float maxx = range[1];
50 val = 2.0f * (cval - sval) / (maxx - minx);
51 CLAMP(val, -1.0f, 1.0f);
62 const float *range =
static_cast<const float *
>(t->
custom.
mode.
data);
63 float minx = range[0];
64 float maxx = range[1];
76 for (i = 0; i < tc->data_len; i++, td++) {
83 if ((sval > minx) && (sval < maxx)) {
84 float cvalc = std::clamp(cval, minx, maxx);
111 timefac = (sval - ival) / (sval - minx);
112 *dst = cvalc - timefac * (cvalc - minx);
115 timefac = (ival - sval) / (maxx - sval);
116 *dst = cvalc + timefac * (maxx - cvalc);
131 float cval[2], sval[2];
132 const float *range =
static_cast<const float *
>(t->
custom.
mode.
data);
133 float minx = range[0];
134 float maxx = range[1];
147 t->
vec[0] = 2.0f * (cval[0] - sval[0]) / (maxx - minx);
180 MEM_mallocN(
sizeof(
float[2]),
"TimeSlide Min/Max"));
183 float min = 999999999.0f, max = -999999999.0f;
187 for (i = 0; i < tc->data_len; i++, td++) {
189 float val = *(td->val);
float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
MINLINE void copy_v3_fl(float r[3], float f)
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
void ED_area_status_text(ScrArea *area, const char *str)
Read Guarded memory(de)allocation.
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
draw_view in_light_buf[] float
void *(* MEM_mallocN)(size_t len, const char *str)
TransCustomDataContainer custom