66 const float mtx[3][3],
67 const float smtx[3][3],
71 float *loc = bezt->
vec[bi];
72 const float *cent = bezt->
vec[1];
83 td2d->
loc[1] = (loc[1] + offset) * unit_scale;
89 td->center[1] = (cent[1] + offset) * unit_scale;
95 td2d->
loc[0] = loc[0];
96 td2d->
loc[1] = (loc[1] + offset) * unit_scale;
102 td->center[1] = (td->center[1] + offset) * unit_scale;
107 td2d->
h1 = bezt->
vec[0];
108 td2d->
h2 = bezt->
vec[2];
165 const bool use_handle,
168 bool *r_right_handle)
171 bool key = (bezt->
f2 &
SELECT) != 0;
172 bool left = use_handle ? ((bezt->
f1 &
SELECT) != 0) : key;
175 if (use_handle &&
t->is_launch_event_tweak) {
190 *r_left_handle =
left;
191 *r_right_handle =
right;
199 bool sel_key, sel_left, sel_right;
202 for (; j < fcu->
totvert; j++) {
207 if (sel_left || sel_key || sel_right) {
230 View2D *v2d = ®ion->v2d;
243 float mtx[3][3], smtx[3][3];
248 bool sel_key, sel_left, sel_right;
273 for (ale = anim_data.first; ale; ale = ale->
next) {
278 bool selected =
false;
295 for (i = 0, bezt = fcu->
bezt; i < fcu->totvert; i++, bezt++) {
303 if (sel_key || sel_left || sel_right) {
317 if (sel_key && !use_local_center) {
360 float xscale, yscale;
370 if (
IS_EQF(xscale, 0.0f) == 0) {
373 if (
IS_EQF(yscale, 0.0f) == 0) {
379 for (ale = anim_data.first; ale; ale = ale->
next) {
383 float unit_scale, offset;
387 if (fcu->
bezt ==
NULL || (is_prop_edit && ale->
tag == 0)) {
402 ac.scene, ale->
id, ale->
key_data, anim_map_flag, &offset);
404 for (i = 0, bezt = fcu->
bezt; i < fcu->totvert; i++, bezt++) {
418 bool is_sel = (sel_key || sel_left || sel_right);
512 if (sel_key && !use_local_center) {
524 if (!(sel_left) || !(sel_right)) {
554 if (hdata && (sel_left) && (sel_right)) {
571 for (ale = anim_data.first; ale; ale = ale->
next) {
592 for (i = 0, bezt = fcu->
bezt; i < fcu->totvert; i++, bezt++) {
598 if (sel_left || sel_key) {
599 td->dist = td->rdist = 0.0f;
607 td->dist = td->rdist = 0.0f;
614 if (sel_right || sel_key) {
615 td->dist = td->rdist = 0.0f;
645 for (i = 0; i < fcu->
totvert; i++, bezt++) {
671 a++, td++, td2d++, tdg++) {
675 float inv_unit_scale = 1.0f / tdg->unit_scale;
685 td2d->loc[0] =
floor((
double)td2d->loc[0] + 0.5);
689 td2d->loc[0] =
floor(((
double)td2d->loc[0] / secf) + 0.5) * secf;
704 td2d->loc2d[0] = td2d->loc[0];
721 td2d->loc2d[0] =
floor((
double)td2d->loc[0] + 0.5);
722 td->loc[0] =
floor((
double)td->loc[0] + 0.5);
727 td2d->loc[0] =
floor(((
double)td2d->loc[0] / secf) + 0.5) * secf;
728 td->loc[0] =
floor(((
double)td->loc[0] / secf) + 0.5) * secf;
735 td2d->loc2d[1] =
floorf(td2d->loc[1] * inv_unit_scale - tdg->offset + 0.5f);
738 td2d->loc2d[1] = td2d->loc[1] * inv_unit_scale - tdg->offset;
742 td2d->h1[0] = td2d->ih1[0] + td->loc[0] - td->iloc[0];
743 td2d->h1[1] = td2d->ih1[1] + (td->loc[1] - td->iloc[1]) * inv_unit_scale;
747 td2d->h2[0] = td2d->ih2[0] + td->loc[0] - td->iloc[0];
748 td2d->h2[1] = td2d->ih2[1] + (td->loc[1] - td->iloc[1]) * inv_unit_scale;
773 if (totvert == 0 || bezts ==
NULL) {
779 for (i = 0; i < totvert; i++, bezm++, prevbezt = bezt, bezt++) {
785 bezm->
pipo = (prevbezt) ? prevbezt->
ipo : bezt->
ipo;
807 if (bezm->
bezt->
vec[1][0] > (bezm + 1)->bezt->vec[1][0]) {
809 (bezm + 1)->newIndex--;
857 for (i = 0; i < totvert; i++, bezm++) {
863 for (j = 0; j < tc->
data_len; j++, td2d++, td++) {
865 if (adjusted[j] != 0) {
872 if (td2d->loc2d == bezm->
bezt->
vec[0]) {
874 td2d->loc2d = (bezts + bezm->
newIndex)->vec[2];
877 td2d->loc2d = (bezts + bezm->
newIndex)->vec[0];
881 else if (td2d->loc2d == bezm->
bezt->
vec[2]) {
883 td2d->loc2d = (bezts + bezm->
newIndex)->vec[0];
886 td2d->loc2d = (bezts + bezm->
newIndex)->vec[2];
890 else if (td2d->loc2d == bezm->
bezt->
vec[1]) {
891 td2d->loc2d = (bezts + bezm->
newIndex)->vec[1];
895 td2d->h1 = (bezts + bezm->
newIndex)->vec[0];
898 td2d->h2 = (bezts + bezm->
newIndex)->vec[2];
936 for (ale = anim_data->
first; ale; ale = ale->
next) {
981 ac.
sl = (
t->area) ?
t->area->spacedata.first :
NULL;
983 ac.
regiontype = (
t->region) ?
t->region->regiontype : 0;
995 for (ale = anim_data.first; ale; ale = ale->
next) {
1056 for (ale = anim_data.
first; ale; ale = ale->
next) {
typedef float(TangentPoint)[2]
struct Main * CTX_data_main(const bContext *C)
void testhandles_fcurve(struct FCurve *fcu, eBezTriple_Flag sel_flag, const bool use_handle)
void calchandles_fcurve_ex(struct FCurve *fcu, eBezTriple_Flag handle_sel_flag)
bool test_time_fcurve(struct FCurve *fcu)
void sort_time_fcurve(struct FCurve *fcu)
float BKE_nla_tweakedit_remap(struct AnimData *adt, float cframe, short mode)
MINLINE float min_ff(float a, float b)
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void unit_m3(float m[3][3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define BEZT_ISSEL_ANY(bezt)
#define OBACT(_view_layer)
@ SIPO_RUNTIME_FLAG_TWEAK_HANDLES_RIGHT
@ SIPO_RUNTIME_FLAG_TWEAK_HANDLES_LEFT
@ V3D_AROUND_LOCAL_ORIGINS
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_CURVE_VISIBLE
_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 right
_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
Read Guarded memory(de)allocation.
void UI_view2d_scale_get(const struct View2D *v2d, float *r_x, float *r_y)
void ANIM_animdata_freelist(ListBase *anim_data)
void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
AnimData * ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys)
float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset)
short ANIM_get_normalization_flags(bAnimContext *ac)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
bool ANIM_animdata_context_getdata(bAnimContext *ac)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
int ED_markers_find_nearest_marker_time(ListBase *markers, float x)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
void ANIM_editkeyframes_refresh(bAnimContext *ac)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
SpaceGraph_Runtime runtime
TransCustomDataContainer custom
TransDataCurveHandleFlags * hdata
struct ViewLayer * view_layer
struct bAnimListElem * next
ccl_device_inline float2 floor(const float2 &a)
ccl_device_inline float2 fabs(const float2 &a)