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:
authorSebastian Parborg <darkdefende@gmail.com>2022-04-28 13:50:22 +0300
committerSebastian Parborg <darkdefende@gmail.com>2022-04-28 13:55:51 +0300
commit77794b1a7b99bd689d1d9872c61d7990fbad2ce4 (patch)
tree48d0a00d5497cb94aa44a157af6fee2bffe0758f /source/blender/editors/include
parent16fe767d0090f3ff2b2c45c63cb4a84805991f3a (diff)
VSE: Add precise drag and drop and strip previews
This patch adds the drag and drop strip previews in the VSE. It also adds two new functions to the drag and drop API. 1. "draw_in_view" for callbacks that wants to draw elements in local viewport coordinates 2. "on_drag_start" that can be used for prefetching data only once at the start of the drag. Reviewed By: Julian, Campbell Differential Revision: http://developer.blender.org/D14560
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_transform.h15
-rw-r--r--source/blender/editors/include/UI_interface.h2
2 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 66c17ff8115..82cc518f029 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -202,6 +202,21 @@ int ED_transform_calc_gizmo_stats(const struct bContext *C,
const struct TransformCalcParams *params,
struct TransformBounds *tbounds);
+/**
+ * Iterates over all the strips and finds the closest snapping candidate of either \a frame_1 or \a
+ * frame_2. The closest snapping candidate will be the closest start or end frame of an existing
+ * strip.
+ * \returns True if there was anything to snap to.
+ */
+bool ED_transform_snap_sequencer_to_closest_strip_calc(struct Scene *scene,
+ struct ARegion *region,
+ int frame_1,
+ int frame_2,
+ int *r_snap_distance,
+ float *r_snap_frame);
+
+void ED_draw_sequencer_snap_point(struct bContext *C, float snap_point);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 1b817d06564..9f4d6815287 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -2925,7 +2925,7 @@ void ED_keymap_ui(struct wmKeyConfig *keyconf);
void ED_dropboxes_ui(void);
void ED_uilisttypes_ui(void);
-void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop);
+void UI_drop_color_copy(struct bContext *C, struct wmDrag *drag, struct wmDropBox *drop);
bool UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event);
bool UI_context_copy_to_selected_list(struct bContext *C,