diff options
author | ok what <ok_what> | 2022-04-21 01:38:39 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-04-21 03:01:10 +0300 |
commit | e16ff4132e35cab6a757105741b8563679bda0bd (patch) | |
tree | 4a73093fb7bed83d95f4140365605309d18b4220 /source/blender/sequencer/intern/strip_transform.c | |
parent | 2bd9cbe40532143bcc520d2ec55e5ff4f4eceebb (diff) |
VSE: Add frame selected operator for preview
This operator moves the view to show the selected visible strips.
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D14222
Diffstat (limited to 'source/blender/sequencer/intern/strip_transform.c')
-rw-r--r-- | source/blender/sequencer/intern/strip_transform.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c index 087e2610bd6..e614dfa9b82 100644 --- a/source/blender/sequencer/intern/strip_transform.c +++ b/source/blender/sequencer/intern/strip_transform.c @@ -517,3 +517,18 @@ void SEQ_image_preview_unit_from_px(const Scene *scene, const float co_src[2], f co_dst[0] = co_src[0] / scene->r.xsch; co_dst[1] = co_src[1] / scene->r.ysch; } + +void SEQ_image_transform_bounding_box_from_collection( + Scene *scene, SeqCollection *strips, bool apply_rotation, float r_min[2], float r_max[2]) +{ + Sequence *seq; + + INIT_MINMAX2(r_min, r_max); + SEQ_ITERATOR_FOREACH (seq, strips) { + float quad[4][2]; + SEQ_image_transform_quad_get(scene, seq, apply_rotation, quad); + for (int i = 0; i < 4; i++) { + minmax_v2v2_v2(r_min, r_max, quad[i]); + } + } +} |