diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-07 06:12:50 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-07 06:12:50 +0400 |
commit | 905b1380054f42fe30b19fb37861057af4760e32 (patch) | |
tree | 878b56d7ef97e56e4af8f6c46e710479441c81b0 /source/blender/editors/space_nla | |
parent | f98c3ed70b86d12945078c288c2bd3288a297841 (diff) |
NLA SoC: Start of integration of Meta-strips in Transform
* Chains of selected strips are now converted to meta-strips before transforms begin, and converted back afterwards. This simplifies the transform code needed in later stages...
* Transform-flushing code for Meta-Strips should now work. There seems to be a little bit of numeric inaccuracy problems somewhere, as two strips which met at the same frame can get separated when scaling.
* Meta-strips now draw with proper text identification
* Snapping strips now properly clears meta-strips if a moved strip needs to be moved into a new track to be accomodated.
* Fixed a filter used by a selection-operator.
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_select.c | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index e31aebf0155..7b9f2faf08a 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -366,13 +366,21 @@ static void nla_draw_strip_text (NlaTrack *nlt, NlaStrip *strip, int index, View /* for now, just init the string with fixed-formats */ switch (strip->type) { case NLASTRIP_TYPE_TRANSITION: /* Transition */ - sprintf(str, "%d | Transition | %.2f %s %.2f", index, strip->start, dir, strip->end); + sprintf(str, "%d | Transition | %.2f %s %.2f", + index, strip->start, dir, strip->end); + break; + + case NLASTRIP_TYPE_META: /* Meta */ + sprintf(str, "%d | %sMeta | %.2f %s %.2f", + index, ((strip->flag & NLASTRIP_FLAG_TEMP_META)?"Temp-":""), + strip->start, dir, strip->end); break; case NLASTRIP_TYPE_CLIP: /* Action-Clip (default) */ default: if (strip->act) - sprintf(str, "%d | Act: %s | %.2f %s %.2f", index, strip->act->id.name+2, strip->start, dir, strip->end); + sprintf(str, "%d | Act: %s | %.2f %s %.2f", + index, strip->act->id.name+2, strip->start, dir, strip->end); else sprintf(str, "%d | Act: <NONE>", index); // xxx... need a better format? break; diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 676d0aac1b1..d663b76d5fe 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1264,6 +1264,9 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op) /* need to add a new track above the current one */ track= add_nlatrack(adt, nlt); BKE_nlatrack_add_strip(track, strip); + + /* clear temp meta-strips on this new track, as we may not be able to get back to it */ + BKE_nlastrips_clear_metas(&track->strips, 0, 1); } } diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index c238818dd1e..ca186dcf702 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -513,7 +513,7 @@ static void nlaedit_mselect_leftright (bContext *C, bAnimContext *ac, short left /* filter data */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY); + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* select strips on the side where most data occurs */ |