Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-09-20 10:47:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-20 10:47:34 +0400
commit2c5aba0c9f25927871b7d35896ac806b4ac8f5d0 (patch)
tree10f16fc5f773ca904a5d2762ceb611b6bb85ae31 /source/blender/blenkernel/intern/constraint.c
parenta036626604d3c693546ade46e0096fb8e4070531 (diff)
bugfix [#22263] Child of constraint - only rotation
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 57e5630da19..dd32d22d09f 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -850,7 +850,14 @@ static void childof_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
* the effect of this constraint (i.e. owner is 'parented' to parent)
*/
copy_m4_m4(tempmat, cob->matrix);
- mul_m4_m4m4(cob->matrix, tempmat, parmat);
+ mul_m4_m4m4(cob->matrix, tempmat, parmat);
+
+ /* without this, changes to scale and rotation can change location
+ * of a parentless bone or a disconnected bone. Even though its set
+ * to zero above. */
+ if (!(data->flag & CHILDOF_LOCX)) cob->matrix[3][0]= tempmat[3][0];
+ if (!(data->flag & CHILDOF_LOCY)) cob->matrix[3][1]= tempmat[3][1];
+ if (!(data->flag & CHILDOF_LOCZ)) cob->matrix[3][2]= tempmat[3][2];
}
}