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:
authorCampbell Barton <ideasman42@gmail.com>2021-10-07 04:32:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-07 19:27:55 +0300
commitd04d27b406b856396102452cab0eedf315e94a54 (patch)
tree4a881ab29123828287f83272a0ca1d03b62b4472 /source/blender/sequencer
parent919e513fa8f9fb4f1304ea4b752869b6d63b1608 (diff)
Sequencer: 2D cursor for the preview & transform
- Use 2D cursor in the preview space using shortcuts matching the UV editor and 3D view. - Add Cursor tool, cursor transform. - Support for cursor and bound-box pivot. - Add pivot pie menu.
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r--source/blender/sequencer/SEQ_transform.h7
-rw-r--r--source/blender/sequencer/intern/strip_transform.c12
2 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/sequencer/SEQ_transform.h b/source/blender/sequencer/SEQ_transform.h
index 328efb9424a..69db21d4c63 100644
--- a/source/blender/sequencer/SEQ_transform.h
+++ b/source/blender/sequencer/SEQ_transform.h
@@ -70,6 +70,13 @@ void SEQ_image_transform_final_quad_get(const struct Scene *scene,
const struct Sequence *seq,
float r_quad[4][2]);
+void SEQ_image_preview_unit_to_px(const struct Scene *scene,
+ const float co_src[2],
+ float co_dst[2]);
+void SEQ_image_preview_unit_from_px(const struct Scene *scene,
+ const float co_src[2],
+ float co_dst[2]);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c
index 8c214f66b96..f014c7a312a 100644
--- a/source/blender/sequencer/intern/strip_transform.c
+++ b/source/blender/sequencer/intern/strip_transform.c
@@ -520,3 +520,15 @@ void SEQ_image_transform_final_quad_get(const Scene *scene,
mul_v2_v2(r_quad[2], mirror);
mul_v2_v2(r_quad[3], mirror);
}
+
+void SEQ_image_preview_unit_to_px(const Scene *scene, const float co_src[2], float co_dst[2])
+{
+ co_dst[0] = co_src[0] * scene->r.xsch;
+ co_dst[1] = co_src[1] * scene->r.ysch;
+}
+
+void SEQ_image_preview_unit_from_px(const Scene *scene, const float co_src[2], float co_dst[2])
+{
+ co_dst[0] = co_src[0] / scene->r.xsch;
+ co_dst[1] = co_src[1] / scene->r.ysch;
+}