Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyframes_edit.c
| Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | |||||
| /* This function is used to loop over the keyframe data in an Action Group */ | /* This function is used to loop over the keyframe data in an Action Group */ | ||||
| static short agrp_keyframes_loop(KeyframeEditData *ked, | static short agrp_keyframes_loop(KeyframeEditData *ked, | ||||
| bActionGroup *agrp, | bActionGroup *agrp, | ||||
| KeyframeEditFunc key_ok, | KeyframeEditFunc key_ok, | ||||
| KeyframeEditFunc key_cb, | KeyframeEditFunc key_cb, | ||||
| FcuEditFunc fcu_cb) | FcuEditFunc fcu_cb) | ||||
| { | { | ||||
| FCurve *fcu; | FCurve *fcu; | ||||
| bActionGroup *subgrp; | |||||
| /* sanity check */ | /* sanity check */ | ||||
| if (agrp == NULL) { | if (agrp == NULL) { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| /* iterate over subgroups */ | |||||
| for (subgrp = agrp->prev; subgrp; subgrp = subgrp->prev) { | |||||
| if (subgrp->parent == agrp) { | |||||
| if (agrp_keyframes_loop(ked, subgrp, key_ok, key_cb, fcu_cb)) { | |||||
| return 1; | |||||
| } | |||||
| } | |||||
| } | |||||
| for (subgrp = agrp->next; subgrp; subgrp = subgrp->next) { | |||||
| if (subgrp->parent == agrp) { | |||||
| if (agrp_keyframes_loop(ked, subgrp, key_ok, key_cb, fcu_cb)) { | |||||
| return 1; | |||||
| } | |||||
| } | |||||
| } | |||||
| /* only iterate over the F-Curves that are in this group */ | /* only iterate over the F-Curves that are in this group */ | ||||
| for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next) { | for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next) { | ||||
| if (ANIM_fcurve_keyframes_loop(ked, fcu, key_ok, key_cb, fcu_cb)) { | if (ANIM_fcurve_keyframes_loop(ked, fcu, key_ok, key_cb, fcu_cb)) { | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| } | } | ||||
| return 0; | return 0; | ||||
| ▲ Show 20 Lines • Show All 992 Lines • Show Last 20 Lines | |||||