From ae72a9206e988a3f4ef5d35393ce490b23db2629 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 20 Oct 2017 17:04:57 +1300 Subject: Fix T46163: NLA properties with drivers aren't displayed as having drivers While such drivers will generally get evaluated too late to be of much use during animations, it can still be useful to allow using drivers to control a whole bunch of NLA strip properties (i.e. syncing NLA strip timings via a single property/control). Keyframe insertion however is still not allowed on these properties (and an error message will now be displayed when trying to do so, instead of silently failing), as it is useless. --- source/blender/editors/animation/keyframing.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/animation/keyframing.c') diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 540886196fe..344c6cc1621 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1789,6 +1789,10 @@ static int insert_key_button_exec(bContext *C, wmOperator *op) if (fcu) { success = insert_keyframe_direct(op->reports, ptr, prop, fcu, cfra, ts->keyframe_type, 0); } + else { + BKE_report(op->reports, RPT_ERROR, + "This property cannot be animated as it will not get updated correctly"); + } } else if (UI_but_flag_is_set(but, UI_BUT_DRIVEN)) { /* Driven property - Find driver */ @@ -1884,7 +1888,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op) } if (ptr.id.data && ptr.data && prop) { - if (ptr.type == &RNA_NlaStrip) { + if (BKE_nlastrip_has_curves_for_property(&ptr, prop)) { /* Handle special properties for NLA Strips, whose F-Curves are stored on the * strips themselves. These are stored separately or else the properties will * not have any effect. -- cgit v1.2.3