Bugfix: When deleting all keyframes from F-Curves, don't delete the F-Curve if

it has a driver
This commit is contained in:
Joshua Leung
2013-09-03 06:46:17 +00:00
parent 033ca89f12
commit 2f426fd1b5

View File

@@ -882,8 +882,12 @@ static void delete_graph_keys(bAnimContext *ac)
delete_fcurve_keys(fcu);
/* Only delete curve too if it won't be doing anything anymore */
if ((fcu->totvert == 0) && (list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0))
if ((fcu->totvert == 0) &&
(list_has_suitable_fmodifier(&fcu->modifiers, 0, FMI_TYPE_GENERATE_CURVE) == 0) &&
(fcu->driver == NULL))
{
ANIM_fcurve_delete_from_animdata(ac, adt, fcu);
}
}
/* free filtered list */