diff options
author | Joshua Leung <aligorith@gmail.com> | 2013-06-09 17:13:47 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2013-06-09 17:13:47 +0400 |
commit | 05ffe37df404462d454273777b656ed06e407da3 (patch) | |
tree | 02d124c7f47f0235d96b7d65cf6d93b96c83e608 /source/blender/editors/space_nla/nla_edit.c | |
parent | 40f21d829da56fe9202641be38190ceb2673ff07 (diff) |
NLA Editor: It is now possible to add strips to AnimData blocks with no existing
tracks
As a convenience feature for those who are loading in action libraries and using
these to quickly block out things in the NLA editor, it is now possible to add
strips to AnimData blocks without first manually creating empty tracks to add
these strips to. Simply ensure that such empty AnimData blocks are selected
(Hint: click on the action line of the affected AnimData block to do so), and
try to add a strip normally.
Diffstat (limited to 'source/blender/editors/space_nla/nla_edit.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 5be3a2b14d4..164382c300d 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -412,6 +412,11 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) act->id.name + 2); } + /* add tracks to empty but selected animdata blocks so that strips can be added to those directly + * without having to manually add tracks first + */ + nlaedit_add_tracks_empty(&ac); + /* get a list of the editable tracks being shown in the NLA * - this is limited to active ones for now, but could be expanded to */ @@ -419,7 +424,9 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); if (items == 0) { - BKE_report(op->reports, RPT_ERROR, "No active track(s) to add strip to"); + BKE_report(op->reports, RPT_ERROR, + "No active track(s) to add strip to. " + "Select an existing track or add one before trying again"); return OPERATOR_CANCELLED; } @@ -1671,8 +1678,6 @@ static int nlaedit_apply_scale_exec(bContext *C, wmOperator *UNUSED(op)) filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); - /* init the editing data */ - /* for each NLA-Track, apply scale of all selected strips */ for (ale = anim_data.first; ale; ale = ale->next) { NlaTrack *nlt = (NlaTrack *)ale->data; |