diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-11-16 10:24:38 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-11-16 10:24:38 +0300 |
commit | 2625dc53487971d3def110ca70b88c178f772712 (patch) | |
tree | 72ee09d909a07ab575169553a6aab88b0f9b6a8f /source/blender/editors/animation/keyframing.c | |
parent | 65d771dcafea2baa8a41389ecf15b069dfe3f392 (diff) |
Bugfix T41525: Button keyframe indicators don't work correctly when editing NLA Strips
When the active action is a NLA strip, the keyframe indicator colors for buttons
and the 3D view indicator (i.e. the current frame indicator changes color) didn't
work correctly. This was because they were still checking for keyframes in
"global" time space, whereas they needed to be applying NLA corrections to
"look inside" the remapped action.
Diffstat (limited to 'source/blender/editors/animation/keyframing.c')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 9a9c987be14..2c66d92ab58 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -2011,7 +2011,13 @@ static bool object_frame_has_keyframe(Object *ob, float frame, short filter) /* check own animation data - specifically, the action it contains */ if ((ob->adt) && (ob->adt->action)) { - if (action_frame_has_keyframe(ob->adt->action, frame, filter)) + /* T41525 - When the active action is a NLA strip being edited, + * we need to correct the frame number to "look inside" the + * remapped action + */ + float ob_frame = BKE_nla_tweakedit_remap(ob->adt, frame, NLATIME_CONVERT_UNMAP); + + if (action_frame_has_keyframe(ob->adt->action, ob_frame, filter)) return 1; } |