removing drivers was trying to remove the fcurve from the actions fcurve list if...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 17 Nov 2009 14:32:19 +0000 (14:32 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 17 Nov 2009 14:32:19 +0000 (14:32 +0000)
not 100% sure this is correct but removing fcurves worked in my tests for actions and drivers.

source/blender/editors/animation/anim_channels_edit.c

index 57a0f46945807c1565207c19e2d0a9f03339fddb..01ab7bd530c33cc1346a1bd2fc28b0b7069cc22d 100644 (file)
@@ -854,13 +854,16 @@ static int animchannels_delete_exec(bContext *C, wmOperator *op)
                                 *      - Action
                                 *      - Drivers
                                 *      - TODO... some others?
+                                *
+                                *      note: this isn't well tested, we could also try remove
+                                *            from all lists just to be safe - campbell
                                 */
                                if (fcu->grp)
                                        action_groups_remove_channel(adt->action, fcu);
-                               else if (adt->action)
-                                       BLI_remlink(&adt->action->curves, fcu);
                                else if (ac.datatype == ANIMCONT_DRIVERS)
                                        BLI_remlink(&adt->drivers, fcu);
+                               else if (adt->action)
+                                       BLI_remlink(&adt->action->curves, fcu);
                                        
                                /* free the F-Curve itself */
                                free_fcurve(fcu);