diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-24 10:40:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-24 10:40:28 +0400 |
commit | adae794233e168aa4046b560c43db6b48725cc08 (patch) | |
tree | 07760de7ef9a04b9912250d77b6450f05ac1be4c /source/blender/blenkernel | |
parent | 70e99a3476aa66fa3ef1238643e9cf37e41ce0cd (diff) |
py/rna remove functions now all work in a similar way.
- some remove() functions took an int argument rather then the item to remove.
- disallow None argument.
- raise an error if the item isnt in the collection.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_constraint.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fmodifier.c | 7 |
4 files changed, 0 insertions, 20 deletions
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index 64e9636cae7..d6e0075df1e 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -136,7 +136,6 @@ struct bConstraint *add_ob_constraint(struct Object *ob, const char *name, short struct bConstraint *add_pose_constraint(struct Object *ob, struct bPoseChannel *pchan, const char *name, short type); int remove_constraint(ListBase *list, struct bConstraint *con); -int remove_constraint_index(ListBase *list, int index); void remove_constraints_type(ListBase *list, short type, short last_only); /* Constraints + Proxies function prototypes */ diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 6de0c55af3b..95e0cfc3a91 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -161,7 +161,6 @@ struct FModifier *add_fmodifier(ListBase *modifiers, int type); struct FModifier *copy_fmodifier(struct FModifier *src); void copy_fmodifiers(ListBase *dst, ListBase *src); int remove_fmodifier(ListBase *modifiers, struct FModifier *fcm); -int remove_fmodifier_index(ListBase *modifiers, int index); void free_fmodifiers(ListBase *modifiers); struct FModifier *find_active_fmodifier(ListBase *modifiers); diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index b415484c1c1..57e5630da19 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3987,17 +3987,6 @@ int remove_constraint (ListBase *list, bConstraint *con) return 0; } -/* Remove the nth constraint from the given constraint stack */ -int remove_constraint_index (ListBase *list, int index) -{ - bConstraint *con= BLI_findlink(list, index); - - if (con) - return remove_constraint(list, con); - else - return 0; -} - /* Remove all the constraints of the specified type from the given constraint stack */ void remove_constraints_type (ListBase *list, short type, short last_only) { diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 124e6365777..f63b58fe489 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -1087,13 +1087,6 @@ int remove_fmodifier (ListBase *modifiers, FModifier *fcm) } } -/* 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); - return remove_fmodifier(modifiers, fcm); -} - /* Remove all of a given F-Curve's modifiers */ void free_fmodifiers (ListBase *modifiers) { |