Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_channels_edit.c
| Show First 20 Lines • Show All 2,839 Lines • ▼ Show 20 Lines | |||||
| static bool rename_anim_channels(bAnimContext *ac, int channel_index) | static bool rename_anim_channels(bAnimContext *ac, int channel_index) | ||||
| { | { | ||||
| ListBase anim_data = {NULL, NULL}; | ListBase anim_data = {NULL, NULL}; | ||||
| const bAnimChannelType *acf; | const bAnimChannelType *acf; | ||||
| bAnimListElem *ale; | bAnimListElem *ale; | ||||
| int filter; | int filter; | ||||
| bool success = false; | bool success = false; | ||||
| /* get the channel that was clicked on */ | /* Filter relevant channels (note that greasepencil/annotations are not displayed in Graph | ||||
| /* filter channels */ | * Editor). */ | ||||
| filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS); | filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS); | ||||
| if (ELEM(ac->datatype, ANIMCONT_FCURVES, ANIMCONT_NLA)) { | |||||
| filter |= ANIMFILTER_FCURVESONLY; | |||||
| } | |||||
| ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); | ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); | ||||
| /* get channel from index */ | /* Get channel that was clicked on from index. */ | ||||
| ale = BLI_findlink(&anim_data, channel_index); | ale = BLI_findlink(&anim_data, channel_index); | ||||
| if (ale == NULL) { | if (ale == NULL) { | ||||
| /* channel not found */ | /* channel not found */ | ||||
| if (G.debug & G_DEBUG) { | if (G.debug & G_DEBUG) { | ||||
| printf("Error: animation channel (index = %d) not found in rename_anim_channels()\n", | printf("Error: animation channel (index = %d) not found in rename_anim_channels()\n", | ||||
| channel_index); | channel_index); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 819 Lines • Show Last 20 Lines | |||||