diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-21 16:26:35 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-21 17:25:33 +0300 |
commit | 2a78635dea1a8e8e54f5350c9856ecc69f2b1751 (patch) | |
tree | a178f1f531bd635b0ab001877c67053bc24b2af3 /source/blender/blenkernel | |
parent | 25c534f20a0a15a4b07d61fb447740dc22049eed (diff) |
Cleanup: get rid of unused `BKE_constraints_relink()`.
Libquery/generic ID remapping code handles this now.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_constraint.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 21 |
2 files changed, 0 insertions, 22 deletions
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index f3cfb901154..047d1787f76 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -120,7 +120,6 @@ void BKE_constraint_unique_name(struct bConstraint *con, struct ListBase *list); void BKE_constraints_free(struct ListBase *list); void BKE_constraints_free_ex(struct ListBase *list, bool do_id_user); void BKE_constraints_copy(struct ListBase *dst, const struct ListBase *src, bool do_extern); -void BKE_constraints_relink(struct ListBase *list); void BKE_constraints_id_loop(struct ListBase *list, ConstraintIDFunc func, void *userdata); void BKE_constraint_free_data(struct bConstraint *con); void BKE_constraint_free_data_ex(struct bConstraint *con, bool do_id_user); diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index b85f1b838ff..9d4de30aa2c 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4705,27 +4705,6 @@ bConstraint *BKE_constraint_add_for_object(Object *ob, const char *name, short t /* ......... */ -/* helper for BKE_constraints_relink() - call ID_NEW() on every ID reference the constraint has */ -static void con_relink_id_cb(bConstraint *UNUSED(con), ID **idpoin, bool UNUSED(is_reference), void *UNUSED(userdata)) -{ - /* ID_NEW() expects a struct with inline "id" member as first - * since we've got the actual ID block, let's just inline this - * code. - * - * See ID_NEW(a) in DNA_ID.h - */ - if ((*idpoin) && (*idpoin)->newid) - (*idpoin) = (void *)(*idpoin)->newid; -} - -/* Reassign links that constraints have to other data (called during file loading?) */ -void BKE_constraints_relink(ListBase *conlist) -{ - /* just a wrapper around ID-loop for just calling ID_NEW() on all ID refs */ - BKE_constraints_id_loop(conlist, con_relink_id_cb, NULL); -} - - /* Run the given callback on all ID-blocks in list of constraints */ void BKE_constraints_id_loop(ListBase *conlist, ConstraintIDFunc func, void *userdata) { |