diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-07-06 05:34:10 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-07-06 05:34:10 +0400 |
commit | 82b17039edcd3563b80b5448baf16f97f9f2e9e5 (patch) | |
tree | 9d9ab082a792ffa40e8c3b2962a1bbbea2fc4fc8 /source/blender/editors/transform | |
parent | eb55fd1b179e4586c4e0e6cd0136c6a4f3d7ba27 (diff) |
NLA Drawing - When "Show Control Curves" option in View menu is
disabled, the strips are drawn so that they take up less vertical
space.
Originally, the primary reason why these were taller than those in the
other animation editors was really so that these control curves could
be visualised adequately. So, when these aren't shown, we can afford
to collapse the strips vertically.
This should make it possible to fit more strips on screen to retime
them. in some staggered fashion.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 4 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 23411b13a32..30010aad3d7 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2479,6 +2479,7 @@ static short FrameOnMouseSide(char side, float frame, float cframe) static void createTransNlaData(bContext *C, TransInfo *t) { Scene *scene= t->scene; + SpaceNla *snla = NULL; TransData *td = NULL; TransDataNla *tdn = NULL; @@ -2492,6 +2493,7 @@ static void createTransNlaData(bContext *C, TransInfo *t) /* determine what type of data we are operating on */ if (ANIM_animdata_get_context(C, &ac) == 0) return; + snla = (SpaceNla *)ac.sl; /* filter data */ filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_FOREDIT); @@ -2577,7 +2579,7 @@ static void createTransNlaData(bContext *C, TransInfo *t) tdn->strip= strip; tdn->trackIndex= BLI_findindex(&adt->nla_tracks, nlt); - yval= (float)(tdn->trackIndex * NLACHANNEL_STEP); + yval= (float)(tdn->trackIndex * NLACHANNEL_STEP(snla)); tdn->h1[0]= strip->start; tdn->h1[1]= yval; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index b62651da3d1..9b56437e985 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -573,8 +573,8 @@ void recalcData(TransInfo *t) /* now, check if we need to try and move track * - we need to calculate both, as only one may have been altered by transform if only 1 handle moved */ - delta_y1= ((int)tdn->h1[1] / NLACHANNEL_STEP - tdn->trackIndex); - delta_y2= ((int)tdn->h2[1] / NLACHANNEL_STEP - tdn->trackIndex); + delta_y1= ((int)tdn->h1[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex); + delta_y2= ((int)tdn->h2[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex); if (delta_y1 || delta_y2) { NlaTrack *track; |