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;
}
/* 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 */