diff options
author | Joshua Leung <aligorith@gmail.com> | 2013-01-02 06:08:43 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2013-01-02 06:08:43 +0400 |
commit | 8b8e5882aa7739af4ce280496b34050f67c193f1 (patch) | |
tree | 325e4a584da2c1db3c9607df4e8ee480b56fb91a /source/blender/blenkernel/intern/constraint.c | |
parent | ec1681fae7439c55cc632647d45aaf60e1fb7907 (diff) |
Replacing/cleaning up some gibberish...
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 4874a3a019d..1a25def3829 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4610,7 +4610,7 @@ short BKE_proxylocked_constraints_owner(Object *ob, bPoseChannel *pchan) * 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 @@ void BKE_get_constraint_target_matrix(struct Scene *scene, bConstraint *con, int 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); |