diff options
author | Joseph Brandenburg <TheAngerSpecialist> | 2020-09-11 16:05:36 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-09-11 16:19:06 +0300 |
commit | ad70d4b0956f5f06f45414cdfae2e2dc19505d71 (patch) | |
tree | 721a84244157fc435386c09c577a8643b4e84a60 /source/blender/blenkernel/intern/constraint.c | |
parent | f3224bbc0f6d78a39557ce61a932c2f334fdee86 (diff) |
Constraints: Child-Of, set inverse matrix upon creation
Set the inverse matrix when the Child Of constraint is created. This
prevents the bone/object from jumping away when the constraint is added,
improving usability.
Reviewed by: sybren
Differential Revision: https://developer.blender.org/D8851
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index e7fe10cf19c..fc1b4d82c20 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -845,7 +845,8 @@ static void childof_new_data(void *cdata) bChildOfConstraint *data = (bChildOfConstraint *)cdata; data->flag = (CHILDOF_LOCX | CHILDOF_LOCY | CHILDOF_LOCZ | CHILDOF_ROTX | CHILDOF_ROTY | - CHILDOF_ROTZ | CHILDOF_SIZEX | CHILDOF_SIZEY | CHILDOF_SIZEZ); + CHILDOF_ROTZ | CHILDOF_SIZEX | CHILDOF_SIZEY | CHILDOF_SIZEZ | + CHILDOF_SET_INVERSE); unit_m4(data->invmat); } |