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_constraints.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_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index e2ad89e0dbc..23ba335476c 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -755,7 +755,7 @@ void drawConstraint(TransInfo *t) { TransCon *tc = &(t->con); - if (!ELEM(t->spacetype, SPACE_VIEW3D, SPACE_IMAGE, SPACE_NODE)) { + if (!ELEM(t->spacetype, SPACE_VIEW3D, SPACE_IMAGE, SPACE_NODE, SPACE_SEQ)) { return; } if (!(tc->mode & CON_APPLY)) { @@ -921,6 +921,16 @@ static void drawObjectConstraint(TransInfo *t) } } + if (t->options & CTX_SEQUENCER_IMAGE) { + /* Because we construct an "L" shape to deform the sequence, we should skip + * all points except the first vertex. Otherwise we will draw the same axis constraint line + * 3 times for each strip. + */ + if (i % 3 != 0) { + continue; + } + } + if (t->flag & T_EDIT) { mul_v3_m4v3(co, tc->mat, td->center); |