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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-12-04 14:11:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-12-04 14:31:32 +0300
commite6141d7b3be8520e030de7b9e57264a76aeb588d (patch)
treef9dcb5d7787ddcdc6b675edc1c96f746a0407008
parentb97cd0e6908b133514232c57509861ca06eca91e (diff)
Fix T58117: Crash with keyframing, take two
More operators need to become aware of action possibly being gone.
-rw-r--r--source/blender/editors/animation/keyframing.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 9faa7a8e8cd..254569a345a 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1302,7 +1302,13 @@ short delete_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act,
ret += delete_keyframe_fcurve(adt, fcu, cfra);
}
-
+ /* In the case last f-curve wes removed need to inform dependency graph
+ * about relations update, since it needs to get rid of animation operation
+ * for this datablock. */
+ if (ret && adt->action == NULL) {
+ DEG_id_tag_update_ex(bmain, id, DEG_TAG_COPY_ON_WRITE);
+ DEG_relations_tag_update(bmain);
+ }
/* return success/failure */
return ret;
}
@@ -1395,7 +1401,8 @@ static short clear_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *a
/* In the case last f-curve wes removed need to inform dependency graph
* about relations update, since it needs to get rid of animation operation
* for this datablock. */
- if (adt->action == NULL) {
+ if (ret && adt->action == NULL) {
+ DEG_id_tag_update_ex(bmain, id, DEG_TAG_COPY_ON_WRITE);
DEG_relations_tag_update(bmain);
}
/* return success/failure */