Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_channels_edit.c
| Show First 20 Lines • Show All 1,344 Lines • ▼ Show 20 Lines | else { | ||||
| ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); | ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); | ||||
| for (ale = anim_data.first; ale; ale = ale->next) { | for (ale = anim_data.first; ale; ale = ale->next) { | ||||
| AnimData *adt = ale->data; | AnimData *adt = ale->data; | ||||
| switch (ac.datatype) { | switch (ac.datatype) { | ||||
| case ANIMCONT_NLA: /* NLA-tracks only */ | case ANIMCONT_NLA: /* NLA-tracks only */ | ||||
| rearrange_nla_channels(&ac, adt, mode); | rearrange_nla_channels(&ac, adt, mode); | ||||
| DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION); | ||||
| break; | break; | ||||
| case ANIMCONT_DRIVERS: /* Drivers list only */ | case ANIMCONT_DRIVERS: /* Drivers list only */ | ||||
| rearrange_driver_channels(&ac, adt, mode); | rearrange_driver_channels(&ac, adt, mode); | ||||
| break; | break; | ||||
| case ANIMCONT_ACTION: /* Single Action only... */ | case ANIMCONT_ACTION: /* Single Action only... */ | ||||
| case ANIMCONT_SHAPEKEY: // DOUBLE CHECK ME... | case ANIMCONT_SHAPEKEY: // DOUBLE CHECK ME... | ||||
| ▲ Show 20 Lines • Show All 270 Lines • ▼ Show 20 Lines | static void update_dependencies_on_delete(bAnimListElem *ale) | ||||
| AnimData *adt = BKE_animdata_from_id(id); | AnimData *adt = BKE_animdata_from_id(id); | ||||
| /* TODO(sergey): Technically, if the animation element is being deleted | /* TODO(sergey): Technically, if the animation element is being deleted | ||||
| * from a driver we don't have to tag action. This is something we can check | * from a driver we don't have to tag action. This is something we can check | ||||
| * for in the future. For now just do most reliable tag whic hwas always | * for in the future. For now just do most reliable tag whic hwas always | ||||
| * happening. */ | * happening. */ | ||||
| if (adt != NULL) { | if (adt != NULL) { | ||||
| DEG_id_tag_update(id, ID_RECALC_ANIMATION); | DEG_id_tag_update(id, ID_RECALC_ANIMATION); | ||||
| if (adt->action != NULL) { | if (adt->action != NULL) { | ||||
| DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION); | ||||
| } | } | ||||
| } | } | ||||
| /* Deals with NLA and drivers. | /* Deals with NLA and drivers. | ||||
| * Doesn't cause overhead for action updates, since object will receive | * Doesn't cause overhead for action updates, since object will receive | ||||
| * animation update after dependency graph flushes update from action to | * animation update after dependency graph flushes update from action to | ||||
| * all its users. */ | * all its users. */ | ||||
| DEG_id_tag_update(id, ID_RECALC_ANIMATION); | DEG_id_tag_update(id, ID_RECALC_ANIMATION); | ||||
| } | } | ||||
| Show All 39 Lines | for (ale = anim_data.first; ale; ale = ale->next) { | ||||
| /* remove from group and action, then free */ | /* remove from group and action, then free */ | ||||
| action_groups_remove_channel(adt->action, fcu); | action_groups_remove_channel(adt->action, fcu); | ||||
| free_fcurve(fcu); | free_fcurve(fcu); | ||||
| } | } | ||||
| /* free the group itself */ | /* free the group itself */ | ||||
| if (adt->action) { | if (adt->action) { | ||||
| BLI_freelinkN(&adt->action->groups, agrp); | BLI_freelinkN(&adt->action->groups, agrp); | ||||
| DEG_id_tag_update_ex(CTX_data_main(C), &adt->action->id, ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update_ex(CTX_data_main(C), &adt->action->id, ID_RECALC_ANIMATION); | ||||
| } | } | ||||
| else | else | ||||
| MEM_freeN(agrp); | MEM_freeN(agrp); | ||||
| } | } | ||||
| } | } | ||||
| /* cleanup */ | /* cleanup */ | ||||
| ANIM_animdata_freelist(&anim_data); | ANIM_animdata_freelist(&anim_data); | ||||
| ▲ Show 20 Lines • Show All 1,531 Lines • Show Last 20 Lines | |||||