[Bf-blender-cvs] [2a78635] master: Cleanup: get rid of unused `BKE_constraints_relink()`.

Bastien Montagne noreply at git.blender.org
Mon Nov 21 15:25:52 CET 2016


Commit: 2a78635dea1a8e8e54f5350c9856ecc69f2b1751
Author: Bastien Montagne
Date:   Mon Nov 21 14:26:35 2016 +0100
Branches: master
https://developer.blender.org/rB2a78635dea1a8e8e54f5350c9856ecc69f2b1751

Cleanup: get rid of unused `BKE_constraints_relink()`.

Libquery/generic ID remapping code handles this now.

===================================================================

M	source/blender/blenkernel/BKE_constraint.h
M	source/blender/blenkernel/intern/constraint.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index f3cfb90..047d178 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 b85f1b8..9d4de30a 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)
 {




More information about the Bf-blender-cvs mailing list