From 08286ef8ba5c880fd9761b397d00ac81e993a657 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 12 Aug 2020 13:20:32 +0200 Subject: Fix T79712: Color Changes do not record in Auto-Key Mode Caused by rBfffba2b6530. In above commit, the buttons rnaindex [-1 for entire arrays like colors] was not used anymore for the entire function body of `ED_autokeyframe_property` (previously in `ui_but_anim_autokey`). Replacing the index with 0 (in the array case) is indeed necessary for `BKE_fcurve_find_by_rna_context_ui`, prior to rBfffba2b6530 this was taken care of by using `ui_but_get_fcurve` instead [which did this internally]. But using an index of 0 (instead of -1) for the entire function body of `ED_autokeyframe_property` fails for the array part later, namely `insert_keyframe` needs -1 here. Now just replace the index for //finding the FCurve//, but use the original for //inserting the keyframe//. Could be backported to 2.83 LTS. Reviewers: campbellbarton, sybren Subscribers: --- source/blender/editors/interface/interface_anim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/editors/interface/interface_anim.c') diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 8d12a1dd1ad..d2f97eabc80 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -306,8 +306,7 @@ bool ui_but_anim_expression_create(uiBut *but, const char *str) void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) { - const int rnaindex = (but->rnaindex == -1) ? 0 : but->rnaindex; - ED_autokeyframe_property(C, scene, &but->rnapoin, but->rnaprop, rnaindex, cfra); + ED_autokeyframe_property(C, scene, &but->rnapoin, but->rnaprop, but->rnaindex, cfra); } void ui_but_anim_copy_driver(bContext *C) -- cgit v1.2.3