[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53501] trunk/blender/source/blender/ blenkernel/intern/constraint.c: Replacing/cleaning up some gibberish...

Joshua Leung aligorith at gmail.com
Wed Jan 2 03:08:48 CET 2013


Revision: 53501
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53501
Author:   aligorith
Date:     2013-01-02 02:08:43 +0000 (Wed, 02 Jan 2013)
Log Message:
-----------
Replacing/cleaning up some gibberish...

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/constraint.c

Modified: trunk/blender/source/blender/blenkernel/intern/constraint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/constraint.c	2013-01-02 01:55:30 UTC (rev 53500)
+++ trunk/blender/source/blender/blenkernel/intern/constraint.c	2013-01-02 02:08:43 UTC (rev 53501)
@@ -4610,7 +4610,7 @@
  * None of the actual calculations of the matrices should be done here! Also, this function is
  * not to be used by any new constraints, particularly any that have multiple targets.
  */
-void BKE_get_constraint_target_matrix(struct Scene *scene, bConstraint *con, int n, short ownertype, void *ownerdata, float mat[4][4], float ctime)
+void BKE_get_constraint_target_matrix(Scene *scene, bConstraint *con, int index, short ownertype, void *ownerdata, float mat[4][4], float ctime)
 {
 	bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
 	ListBase targets = {NULL, NULL};
@@ -4657,10 +4657,8 @@
 		cti->get_constraint_targets(con, &targets);
 		
 		/* only calculate the target matrix on the first target */
-		ct = (bConstraintTarget *)targets.first;
-		while (ct && n-- > 0)
-			ct = ct->next;
-
+		ct = (bConstraintTarget *)BLI_findlink(&targets, index);
+		
 		if (ct) {
 			if (cti->get_target_matrix)
 				cti->get_target_matrix(con, cob, ct, ctime);




More information about the Bf-blender-cvs mailing list