Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2017-10-20 07:04:57 +0300
committerJoshua Leung <aligorith@gmail.com>2017-10-20 07:05:50 +0300
commitae72a9206e988a3f4ef5d35393ce490b23db2629 (patch)
treea5528870d687b0f9381963abbb131d9925b94d6f /source/blender/editors/animation
parent959a58da9e4d23be2738b6979ec208f05468f50c (diff)
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.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/keyframing.c6
1 files changed, 5 insertions, 1 deletions
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.