Fix clear keyframes op not reporting when called over a locked fcurve.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 27 Jan 2016 16:23:55 +0000 (17:23 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 27 Jan 2016 16:23:55 +0000 (17:23 +0100)
Debug print here is not that useful to common user, and keyframe deletion
does report warning, so do the same for clear op.

Reported by venomgfx over IRC, thanks.

source/blender/editors/animation/keyframing.c

index 0d105f9b6e2958e87d684ead2efb9a094a5a942a..d376a20d388a34d01104f27a27e7239e34dfff0e 100644 (file)
@@ -1253,8 +1253,9 @@ static short clear_keyframe(ReportList *reports, ID *id, bAction *act, const cha
                        continue;
 
                if (BKE_fcurve_is_protected(fcu)) {
-                       if (G.debug & G_DEBUG)
-                               printf("WARNING: not deleting keyframe for locked F-Curve\n");
+                       BKE_reportf(reports, RPT_WARNING,
+                                   "Not clearing all keyframes from locked F-Curve '%s' for %s '%s'",
+                                   fcu->rna_path, BKE_idcode_to_name(GS(id->name)), id->name + 2);
                        continue;
                }