diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-10-08 13:09:27 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2021-10-08 13:14:45 +0300 |
commit | 482806c81678e351ff171c68a757386a5b2d4676 (patch) | |
tree | 7f9b1dfccb0683584af937ec77b440cb6ccaa413 /source/blender/editors/transform/transform.c | |
parent | a3e2cc0bb7fe47fa1122cd19c4fa8a5aa59f761c (diff) |
VSE: Implement the bounding box (xform) tool in the seq preview window
Make the "xform" tool/gizmo available for strip transformations in the
sequencer preview window.
Because of the amount of hacks needed to make the gizmo work nicely with
multiple strips at the same time, it was decided to only show the
translate gizmo when multiple strips are selected.
This is because the transforms with multiple strips would appear buggy
because of our lack of shearing support in the transform system.
There is also currently no way to properly sync the gizmo drawing with
the transform when using multiple strips.
Reviewed By: Richard Antalik, Campbell Barton
Differential Revision: http://developer.blender.org/D12729
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 9dcd3a3e510..ec3847acbce 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -797,6 +797,25 @@ static bool transform_event_modal_constraint(TransInfo *t, short modal_type) if (constraint_new == CON_AXIS2) { return false; } + + if (t->data_type == TC_SEQ_IMAGE_DATA) { + /* Setup the 2d msg string so it writes out the transform space. */ + msg_2d = msg_3d; + + short orient_index = 1; + if (t->orient_curr == O_DEFAULT || ELEM(constraint_curr, -1, constraint_new)) { + /* Successive presses on existing axis, cycle orientation modes. */ + orient_index = (short)((t->orient_curr + 1) % (int)ARRAY_SIZE(t->orient)); + } + + transform_orientations_current_set(t, orient_index); + if (orient_index != 0) { + /* Make sure that we don't stop the constraint unless we are looped back around to + * "no constraint". */ + constraint_curr = -1; + } + } + if (constraint_curr == constraint_new) { stopConstraint(t); } |