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:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-09-04 14:59:18 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-09-06 07:58:13 +0300
commitf8362836a5c8feff3715ca823025caba249208c2 (patch)
treec3406460a139947c4613b86e392a1f4ffb6a5e2d /source/blender/editors/transform/transform_convert.c
parentf4056e9ec3a89afbc592af3e3d169d2d584a9937 (diff)
Copy Transforms: add a mixing mode option.
Allow combining location, rotation and scale at the same time, using one constraint. The mixing modes are based on matrix multiplication, but handle scale in a way that avoids creating shear. Reviewers: brecht Differential Revision: https://developer.blender.org/D5640
Diffstat (limited to 'source/blender/editors/transform/transform_convert.c')
-rw-r--r--source/blender/editors/transform/transform_convert.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c
index 14eee2318cd..cbb291414bf 100644
--- a/source/blender/editors/transform/transform_convert.c
+++ b/source/blender/editors/transform/transform_convert.c
@@ -1335,6 +1335,15 @@ bool constraints_list_needinv(TransInfo *t, ListBase *list)
return true;
}
}
+ else if (con->type == CONSTRAINT_TYPE_TRANSLIKE) {
+ /* Copy Transforms constraint only does this in the Before mode. */
+ bTransLikeConstraint *data = (bTransLikeConstraint *)con->data;
+
+ if (ELEM(data->mix_mode, TRANSLIKE_MIX_BEFORE) &&
+ ELEM(t->mode, TFM_ROTATION, TFM_TRANSLATION)) {
+ return true;
+ }
+ }
else if (con->type == CONSTRAINT_TYPE_TRANSFORM) {
/* Transform constraint needs it for rotation at least (r.57309),
* but doing so when translating may also mess things up [#36203]