Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_channels_edit.c
| Show First 20 Lines • Show All 2,020 Lines • ▼ Show 20 Lines | |||||
| /* ------------------- */ | /* ------------------- */ | ||||
| /** | /** | ||||
| * Set/clear a particular flag (setting) for all selected + visible channels | * Set/clear a particular flag (setting) for all selected + visible channels | ||||
| * \param setting: the setting to modify. | * \param setting: the setting to modify. | ||||
| * \param mode: eAnimChannels_SetFlag. | * \param mode: eAnimChannels_SetFlag. | ||||
| * \param onlysel: only selected channels get the flag set. | * \param onlysel: only selected channels get the flag set. | ||||
| * | * | ||||
| * TODO: enable a setting which turns flushing on/off?. | * TODO: enable a setting which turns flushing on/off? | ||||
| */ | */ | ||||
| static void setflag_anim_channels(bAnimContext *ac, | static void setflag_anim_channels(bAnimContext *ac, | ||||
| eAnimChannel_Settings setting, | eAnimChannel_Settings setting, | ||||
| eAnimChannels_SetFlag mode, | eAnimChannels_SetFlag mode, | ||||
| bool onlysel, | bool onlysel, | ||||
| bool flush) | bool flush) | ||||
| { | { | ||||
| ListBase anim_data = {NULL, NULL}; | ListBase anim_data = {NULL, NULL}; | ||||
| ▲ Show 20 Lines • Show All 640 Lines • ▼ Show 20 Lines | static void box_select_anim_channels(bAnimContext *ac, rcti *rect, short selectmode) | ||||
| } | } | ||||
| else { | else { | ||||
| ymax = ACHANNEL_FIRST_TOP(ac); | ymax = ACHANNEL_FIRST_TOP(ac); | ||||
| } | } | ||||
| /* loop over data, doing box select */ | /* loop over data, doing box select */ | ||||
| for (ale = anim_data.first; ale; ale = ale->next) { | for (ale = anim_data.first; ale; ale = ale->next) { | ||||
| float ymin; | float ymin; | ||||
| /* Skip grease pencil datablock. Only use grease pencil layers. */ | |||||
| if (ale->type == ANIMTYPE_GPDATABLOCK) { | if (ale->type == ANIMTYPE_GPDATABLOCK) { | ||||
| ymax -= ACHANNEL_STEP(ac); | |||||
| continue; | continue; | ||||
| } | } | ||||
| if (ac->datatype == ANIMCONT_NLA) { | if (ac->datatype == ANIMCONT_NLA) { | ||||
| ymin = ymax - NLACHANNEL_STEP(snla); | ymin = ymax - NLACHANNEL_STEP(snla); | ||||
| } | } | ||||
| else { | else { | ||||
| ymin = ymax - ACHANNEL_STEP(ac); | ymin = ymax - ACHANNEL_STEP(ac); | ||||
| ▲ Show 20 Lines • Show All 900 Lines • Show Last 20 Lines | |||||