Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_nla/nla_channels.c
| Show First 20 Lines • Show All 729 Lines • ▼ Show 20 Lines | static int nlaedit_add_tracks_exec(bContext *C, wmOperator *op) | ||||
| op_done |= nlaedit_add_tracks_existing(&ac, above_sel); | op_done |= nlaedit_add_tracks_existing(&ac, above_sel); | ||||
| op_done |= nlaedit_add_tracks_empty(&ac); | op_done |= nlaedit_add_tracks_empty(&ac); | ||||
| /* done? */ | /* done? */ | ||||
| if (op_done) { | if (op_done) { | ||||
| DEG_relations_tag_update(CTX_data_main(C)); | DEG_relations_tag_update(CTX_data_main(C)); | ||||
| /* set notifier that things have changed */ | /* set notifier that things have changed */ | ||||
| WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL); | WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_ADDED, NULL); | ||||
| /* done */ | /* done */ | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| /* failed to add any tracks */ | /* failed to add any tracks */ | ||||
| BKE_report( | BKE_report( | ||||
| op->reports, RPT_WARNING, "Select an existing NLA Track or an empty action line first"); | op->reports, RPT_WARNING, "Select an existing NLA Track or an empty action line first"); | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | static int nlaedit_delete_tracks_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| /* free temp data */ | /* free temp data */ | ||||
| ANIM_animdata_update(&ac, &anim_data); | ANIM_animdata_update(&ac, &anim_data); | ||||
| ANIM_animdata_freelist(&anim_data); | ANIM_animdata_freelist(&anim_data); | ||||
| DEG_relations_tag_update(ac.bmain); | DEG_relations_tag_update(ac.bmain); | ||||
| /* set notifier that things have changed */ | /* set notifier that things have changed */ | ||||
| WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_EDITED, NULL); | WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_REMOVED, NULL); | ||||
| /* done */ | /* done */ | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void NLA_OT_tracks_delete(wmOperatorType *ot) | void NLA_OT_tracks_delete(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||