diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-11-16 15:33:42 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-11-16 15:33:42 +0300 |
commit | a12c2a85610e28248effd019ae46518da22dac30 (patch) | |
tree | 1feb3968d5a22c9a65a86b8f329aa8b311517a78 /source/blender/blenkernel/intern/fmodifier.c | |
parent | 567ee32f14304a462e59bde2de92b10861ad7c86 (diff) |
Constraints: Code cleanup
* Removing duplicate api functions
* Shuffled around newly added api functions to make the ordering more consistent
* Fixes for a few bugs in the api functions as I checked over them
* Replaced most of the #defines for flags and modes with enums
Diffstat (limited to 'source/blender/blenkernel/intern/fmodifier.c')
-rw-r--r-- | source/blender/blenkernel/intern/fmodifier.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index e9e12e29606..5daa2ed1924 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -1013,22 +1013,20 @@ int remove_fmodifier (ListBase *modifiers, FModifier *fcm) if (modifiers) { BLI_freelinkN(modifiers, fcm); return 1; - } else { + } + else { // XXX this case can probably be removed some day, as it shouldn't happen... printf("remove_fmodifier() - no modifier stack given \n"); MEM_freeN(fcm); return 0; } } + +/* Remove and free the nth F-Modifier from the given stack */ int remove_fmodifier_index (ListBase *modifiers, int index) { FModifier *fcm= BLI_findlink(modifiers, index); - if(fcm) { - return remove_fmodifier(modifiers, fcm); - } - else { - return 0; - } + return remove_fmodifier(modifiers, fcm); } /* Remove all of a given F-Curve's modifiers */ |