diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2021-08-02 19:08:12 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2021-08-05 21:21:29 +0300 |
commit | cf10eb54cc4bc89e763dc48644c402f7578fa6b2 (patch) | |
tree | 1d3773a26ba46ae7f240512fdaab8eee108730e2 /source/blender/editors/transform | |
parent | d01781129fab7846a6a03815b0c0b48b2a809c39 (diff) |
Action Constraint: add Split Channels Mix choices from Copy Transforms
Practice shows that when combining actions and direct animation
it is usually best to combine location, rotation and scale
separately, which is implemented by the Split Channels modes
recently introduced in D9469 for Copy Transforms. This completes
the same set of 6 choices for the Action Constraint.
The default for new constraints is changed to the newly
added Before Original (Split Channels) mode.
The original patch is motivated by Loic Pinsard, who created
an addon that does the equivalent of this feature by splitting
the action into two, separating location and rotation+scale.
Differential Revision: https://developer.blender.org/D7547
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_convert.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index 00fd008151d..e77fedfe143 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -861,10 +861,13 @@ bool constraints_list_needinv(TransInfo *t, ListBase *list) /* The Action constraint only does this in the Before mode. */ bActionConstraint *data = (bActionConstraint *)con->data; - if (ELEM(data->mix_mode, ACTCON_MIX_BEFORE) && + if (ELEM(data->mix_mode, ACTCON_MIX_BEFORE, ACTCON_MIX_BEFORE_FULL) && ELEM(t->mode, TFM_ROTATION, TFM_TRANSLATION)) { return true; } + if (ELEM(data->mix_mode, ACTCON_MIX_BEFORE_SPLIT) && ELEM(t->mode, TFM_ROTATION)) { + return true; + } } else if (con->type == CONSTRAINT_TYPE_TRANSFORM) { /* Transform constraint needs it for rotation at least (r.57309), |