From cf10eb54cc4bc89e763dc48644c402f7578fa6b2 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Mon, 2 Aug 2021 19:08:12 +0300 Subject: 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 --- source/blender/editors/transform/transform_convert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/transform') 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), -- cgit v1.2.3