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/editors/space_sequencer/space_sequencer.c
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/editors/space_sequencer/space_sequencer.c')
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index ad0ceb82709..c1f853270e9 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -41,6 +41,8 @@
#include "BKE_screen.h"
#include "BKE_sequencer_offscreen.h"
+#include "GPU_state.h"
+
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_transform.h"
@@ -53,6 +55,7 @@
#include "RNA_access.h"
+#include "SEQ_transform.h"
#include "SEQ_utils.h"
#include "UI_interface.h"
@@ -61,6 +64,9 @@
#include "IMB_imbuf.h"
+/* Only for cursor drawing. */
+#include "DRW_engine.h"
+
/* Own include. */
#include "sequencer_intern.h"
@@ -803,6 +809,17 @@ static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
}
}
+ {
+ GPU_color_mask(true, true, true, true);
+ GPU_depth_mask(false);
+ GPU_depth_test(GPU_DEPTH_NONE);
+
+ float cursor_pixel[2];
+ SEQ_image_preview_unit_to_px(scene, sseq->cursor, cursor_pixel);
+
+ DRW_draw_cursor_2d_ex(region, cursor_pixel);
+ }
+
WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) {