Commit: 50a8a95ce3f88303f29fa8839ef37b372df5ce49
Author: Brecht Van Lommel
Date:   Fri Mar 8 15:40:22 2019 +0100
Branches: master
https://developer.blender.org/rB50a8a95ce3f88303f29fa8839ef37b372df5ce49

Fix T60086: missing update when removing fcurves from Python API.

===================================================================

M       source/blender/makesrna/intern/rna_action.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_action.c 
b/source/blender/makesrna/intern/rna_action.c
index fd45a9a9048..293ff1db505 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -47,8 +47,11 @@
 
 #include "BKE_fcurve.h"
 
+#include "DEG_depsgraph.h"
+
 #include "ED_keyframing.h"
 
+#include "WM_api.h"
 
 static void rna_ActionGroup_channels_next(CollectionPropertyIterator *iter)
 {
@@ -94,6 +97,9 @@ static void rna_Action_groups_remove(bAction *act, ReportList 
*reports, PointerR
 
        MEM_freeN(agrp);
        RNA_POINTER_INVALIDATE(agrp_ptr);
+
+       DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
+       WM_main_add_notifier(NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
 }
 
 static FCurve *rna_Action_fcurve_new(bAction *act, Main *bmain, ReportList 
*reports, const char *data_path,
@@ -150,6 +156,9 @@ static void rna_Action_fcurve_remove(bAction *act, 
ReportList *reports, PointerR
                free_fcurve(fcu);
                RNA_POINTER_INVALIDATE(fcu_ptr);
        }
+
+       DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
+       WM_main_add_notifier(NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
 }
 
 static TimeMarker *rna_Action_pose_markers_new(bAction *act, const char name[])

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to