Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyframes_edit.c
| Show First 20 Lines • Show All 450 Lines • ▼ Show 20 Lines | case ALE_SCE: /* scene */ | ||||
| return scene_keyframes_loop(ked, ads, (Scene *)data, key_ok, key_cb, fcu_cb); | return scene_keyframes_loop(ked, ads, (Scene *)data, key_ok, key_cb, fcu_cb); | ||||
| case ALE_ALL: /* 'all' (DopeSheet summary) */ | case ALE_ALL: /* 'all' (DopeSheet summary) */ | ||||
| return summary_keyframes_loop(ked, (bAnimContext *)data, key_ok, key_cb, fcu_cb); | return summary_keyframes_loop(ked, (bAnimContext *)data, key_ok, key_cb, fcu_cb); | ||||
| } | } | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| void ANIM_animdata_keyframe_callback(bAnimContext *ac, | |||||
| eAnimFilter_Flags filter, | |||||
| KeyframeEditFunc callback_fn) | |||||
| { | |||||
| ListBase anim_data = {NULL, NULL}; | |||||
| bAnimListElem *ale; | |||||
| ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); | |||||
| for (ale = anim_data.first; ale; ale = ale->next) { | |||||
| ANIM_fcurve_keyframes_loop(NULL, ale->key_data, NULL, callback_fn, calchandles_fcurve); | |||||
| ale->update |= ANIM_UPDATE_DEFAULT; | |||||
| } | |||||
| ANIM_animdata_update(ac, &anim_data); | |||||
| ANIM_animdata_freelist(&anim_data); | |||||
| } | |||||
| /* ************************************************************************** */ | /* ************************************************************************** */ | ||||
| /* Keyframe Integrity Tools */ | /* Keyframe Integrity Tools */ | ||||
| /* Rearrange keyframes if some are out of order */ | /* Rearrange keyframes if some are out of order */ | ||||
| // used to be recalc_*_ipos() where * was object or action | // used to be recalc_*_ipos() where * was object or action | ||||
| void ANIM_editkeyframes_refresh(bAnimContext *ac) | void ANIM_editkeyframes_refresh(bAnimContext *ac) | ||||
| { | { | ||||
| ListBase anim_data = {NULL, NULL}; | ListBase anim_data = {NULL, NULL}; | ||||
| ▲ Show 20 Lines • Show All 1,194 Lines • Show Last 20 Lines | |||||