diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-06 11:54:34 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-06 12:53:35 +0300 |
commit | e858d21ae42386c57c7f5b4b0982642173f460e5 (patch) | |
tree | 90d36cb8f5bd0ba8be7414b5027553eeca115c77 /source/blender/editors/transform | |
parent | a23ce7f3b78b28550c6e6cfd73404b82dc210529 (diff) |
Transformation Constraint: implement a Mix Mode option.
Allow selecting how the new location/rotation/scale is combined with
the existing transformation. This is most useful for rotation, which
has multiple options, and scale, which previously could only replace.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_convert.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index cbb291414bf..6da03d917a6 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -1348,11 +1348,13 @@ bool constraints_list_needinv(TransInfo *t, ListBase *list) /* Transform constraint needs it for rotation at least (r.57309), * but doing so when translating may also mess things up [#36203] */ + bTransformConstraint *data = (bTransformConstraint *)con->data; - if (t->mode == TFM_ROTATION) { - return true; + if (data->to == TRANS_ROTATION) { + if (t->mode == TFM_ROTATION && data->mix_mode_rot == TRANS_MIXROT_BEFORE) { + return true; + } } - /* ??? (t->mode == TFM_SCALE) ? */ } } } |