From fa2c1698b077f510175e79adf3dbf3e1602b1030 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Tue, 21 Sep 2021 09:38:30 +0200 Subject: VSE: Image transform tools Add tools for image manipulation in sequencer preview region. This includes: - Translate, rotate and resize operators, tools and gizmos - Origin for image transformation - Median point and individual origins pivot modes - Select and Box select operator works in preview - Image overlay drawing ref T90156 Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12105 --- source/blender/makesdna/DNA_scene_types.h | 1 + source/blender/makesdna/DNA_sequence_types.h | 2 ++ source/blender/makesdna/DNA_space_types.h | 2 ++ 3 files changed, 5 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 7800e7f9efe..f2244b4ae61 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1344,6 +1344,7 @@ typedef struct SequencerToolSettings { /** When there are many snap points, 0-1 range corresponds to resolution from boundbox to all * possible snap points. */ int snap_distance; + int pivot_point; } SequencerToolSettings; typedef enum eSeqOverlapMode { diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 03c38eb71a0..782b4ac34aa 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -74,6 +74,8 @@ typedef struct StripTransform { float scale_x; float scale_y; float rotation; + /** 0-1 range, use SEQ_image_transform_origin_offset_pixelspace_get to convert to pixel space. */ + float origin[2]; } StripTransform; typedef struct StripColorBalance { diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 6505816256c..84dc58345e3 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -583,6 +583,7 @@ typedef struct SequencerPreviewOverlay { /* SequencerPreviewOverlay.flag */ typedef enum eSpaceSeq_SequencerPreviewOverlay_Flag { + SEQ_PREVIEW_SHOW_OUTLINE_SELECTED = (1 << 2), SEQ_PREVIEW_SHOW_SAFE_MARGINS = (1 << 3), SEQ_PREVIEW_SHOW_GPENCIL = (1 << 4), SEQ_PREVIEW_SHOW_SAFE_CENTER = (1 << 9), @@ -685,6 +686,7 @@ typedef enum eSpaceSeq_Flag { SPACE_SEQ_FLAG_UNUSED_15 = (1 << 15), SPACE_SEQ_FLAG_UNUSED_16 = (1 << 16), SEQ_USE_PROXIES = (1 << 17), + SEQ_SHOW_GRID = (1 << 18), } eSpaceSeq_Flag; /* SpaceSeq.view */ -- cgit v1.2.3