diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-08-25 05:46:05 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-08-25 05:46:05 +0400 |
commit | e2eaf269350d972daec1f19ae5aa5ee7fbad4685 (patch) | |
tree | 31142b1fb2246b1581feccc679a8b23a1e906742 /source/blender/editors/space_nla | |
parent | 4a78b9e9046567e86ed3ccada83a50c43684facd (diff) |
2.5 - NLA Bugfixes:
* F-Modifiers on F-Curves can now taken into account when calculating the extents of actions. This is used when there are some NLA strips and some action with some F-Modifiers is being played back on top of those.
* The toggles in the NLA channels list now respect the width of the list instead of using a hardcoded position. This means that clicking on these toggles when the list is resized works again.
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_channels.c | 7 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 063b329b7a1..ccf23266427 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -97,6 +97,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; int filter; + View2D *v2d= &ac->ar->v2d; int notifierFlags = 0; /* get the channel that was clicked on */ @@ -186,14 +187,14 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho else offset= 0; - if (x >= (NLACHANNEL_NAMEWIDTH-NLACHANNEL_BUTTON_WIDTH)) { + if (x >= (v2d->cur.xmax-NLACHANNEL_BUTTON_WIDTH)) { /* toggle protection (only if there's a toggle there) */ nlt->flag ^= NLATRACK_PROTECTED; /* notifier flags - channel was edited */ notifierFlags |= ND_ANIMCHAN_EDIT; } - else if (x >= (NLACHANNEL_NAMEWIDTH-2*NLACHANNEL_BUTTON_WIDTH)) { + else if (x >= (v2d->cur.xmax-2*NLACHANNEL_BUTTON_WIDTH)) { /* toggle mute */ nlt->flag ^= NLATRACK_MUTED; @@ -232,7 +233,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho { AnimData *adt= BKE_animdata_from_id(ale->owner); /* this won't crash, right? */ - if (x >= (NLACHANNEL_NAMEWIDTH-NLACHANNEL_BUTTON_WIDTH)) { + if (x >= (v2d->cur.xmax-NLACHANNEL_BUTTON_WIDTH)) { if (nlaedit_is_tweakmode_on(ac) == 0) { /* 'push-down' action - only usable when not in TweakMode */ // TODO: make this use the operator instead of calling the function directly diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 763f4116416..e53ccd004db 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1249,7 +1249,7 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *op) * but leave everything else alone */ strip->scale= 1.0f; - calc_action_range(strip->act, &strip->actstart, &strip->actend, 1); + calc_action_range(strip->act, &strip->actstart, &strip->actend, 0); } } } |