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/blenkernel/intern | |
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/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index e90a0891436..325c60566f7 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -309,17 +309,18 @@ int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, return matches; } -FCurve *rna_get_fcurve(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, bAction **action, bool *r_driven) +FCurve *rna_get_fcurve(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **adt, bAction **action, bool *r_driven) { - return rna_get_fcurve_context_ui(NULL, ptr, prop, rnaindex, action, r_driven); + return rna_get_fcurve_context_ui(NULL, ptr, prop, rnaindex, adt, action, r_driven); } FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, - bAction **action, bool *r_driven) + AnimData **animdata, bAction **action, bool *r_driven) { FCurve *fcu = NULL; PointerRNA tptr = *ptr; + if (animdata) *animdata = NULL; *r_driven = false; /* there must be some RNA-pointer + property combon */ @@ -350,11 +351,14 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro if (!fcu && (adt->drivers.first)) { fcu = list_find_fcurve(&adt->drivers, path, rnaindex); - if (fcu) + if (fcu) { + if (animdata) *animdata = adt; *r_driven = true; + } } if (fcu && action) { + if (animdata) *animdata = adt; *action = adt->action; break; } |