Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyframes_keylist.cc
| Show First 20 Lines • Show All 937 Lines • ▼ Show 20 Lines | void scene_to_keylist(bDopeSheet *ads, Scene *sce, AnimKeylist *keylist, const int saction_flag) | ||||
| dummychan.id = &sce->id; | dummychan.id = &sce->id; | ||||
| dummychan.adt = sce->adt; | dummychan.adt = sce->adt; | ||||
| ac.ads = ads; | ac.ads = ads; | ||||
| ac.data = &dummychan; | ac.data = &dummychan; | ||||
| ac.datatype = ANIMCONT_CHANNEL; | ac.datatype = ANIMCONT_CHANNEL; | ||||
| /* get F-Curves to take keyframes from */ | /* get F-Curves to take keyframes from */ | ||||
| const eAnimFilter_Flags filter = ANIMFILTER_DATA_VISIBLE; /* curves only */ | const eAnimFilter_Flags filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FCURVESONLY; | ||||
| ANIM_animdata_filter( | ANIM_animdata_filter( | ||||
| &ac, &anim_data, filter, ac.data, static_cast<eAnimCont_Types>(ac.datatype)); | &ac, &anim_data, filter, ac.data, static_cast<eAnimCont_Types>(ac.datatype)); | ||||
| /* loop through each F-Curve, grabbing the keyframes */ | /* loop through each F-Curve, grabbing the keyframes */ | ||||
| LISTBASE_FOREACH (const bAnimListElem *, ale, &anim_data) { | LISTBASE_FOREACH (const bAnimListElem *, ale, &anim_data) { | ||||
| fcurve_to_keylist(ale->adt, static_cast<FCurve *>(ale->data), keylist, saction_flag); | fcurve_to_keylist(ale->adt, static_cast<FCurve *>(ale->data), keylist, saction_flag); | ||||
| } | } | ||||
| Show All 20 Lines | void ob_to_keylist(bDopeSheet *ads, Object *ob, AnimKeylist *keylist, const int saction_flag) | ||||
| dummychan.id = &ob->id; | dummychan.id = &ob->id; | ||||
| dummychan.adt = ob->adt; | dummychan.adt = ob->adt; | ||||
| ac.ads = ads; | ac.ads = ads; | ||||
| ac.data = &dummychan; | ac.data = &dummychan; | ||||
| ac.datatype = ANIMCONT_CHANNEL; | ac.datatype = ANIMCONT_CHANNEL; | ||||
| /* get F-Curves to take keyframes from */ | /* get F-Curves to take keyframes from */ | ||||
| const eAnimFilter_Flags filter = ANIMFILTER_DATA_VISIBLE; /* curves only */ | const eAnimFilter_Flags filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FCURVESONLY; | ||||
| ANIM_animdata_filter( | ANIM_animdata_filter( | ||||
| &ac, &anim_data, filter, ac.data, static_cast<eAnimCont_Types>(ac.datatype)); | &ac, &anim_data, filter, ac.data, static_cast<eAnimCont_Types>(ac.datatype)); | ||||
| /* loop through each F-Curve, grabbing the keyframes */ | /* loop through each F-Curve, grabbing the keyframes */ | ||||
| LISTBASE_FOREACH (const bAnimListElem *, ale, &anim_data) { | LISTBASE_FOREACH (const bAnimListElem *, ale, &anim_data) { | ||||
| fcurve_to_keylist(ale->adt, static_cast<FCurve *>(ale->data), keylist, saction_flag); | fcurve_to_keylist(ale->adt, static_cast<FCurve *>(ale->data), keylist, saction_flag); | ||||
| } | } | ||||
| Show All 18 Lines | void cachefile_to_keylist(bDopeSheet *ads, | ||||
| bAnimContext ac = {nullptr}; | bAnimContext ac = {nullptr}; | ||||
| ac.ads = ads; | ac.ads = ads; | ||||
| ac.data = &dummychan; | ac.data = &dummychan; | ||||
| ac.datatype = ANIMCONT_CHANNEL; | ac.datatype = ANIMCONT_CHANNEL; | ||||
| /* get F-Curves to take keyframes from */ | /* get F-Curves to take keyframes from */ | ||||
| ListBase anim_data = {nullptr, nullptr}; | ListBase anim_data = {nullptr, nullptr}; | ||||
| const eAnimFilter_Flags filter = ANIMFILTER_DATA_VISIBLE; /* curves only */ | const eAnimFilter_Flags filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FCURVESONLY; | ||||
| ANIM_animdata_filter( | ANIM_animdata_filter( | ||||
| &ac, &anim_data, filter, ac.data, static_cast<eAnimCont_Types>(ac.datatype)); | &ac, &anim_data, filter, ac.data, static_cast<eAnimCont_Types>(ac.datatype)); | ||||
| /* loop through each F-Curve, grabbing the keyframes */ | /* loop through each F-Curve, grabbing the keyframes */ | ||||
| LISTBASE_FOREACH (const bAnimListElem *, ale, &anim_data) { | LISTBASE_FOREACH (const bAnimListElem *, ale, &anim_data) { | ||||
| fcurve_to_keylist(ale->adt, static_cast<FCurve *>(ale->data), keylist, saction_flag); | fcurve_to_keylist(ale->adt, static_cast<FCurve *>(ale->data), keylist, saction_flag); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines | |||||