Blender  V3.3
clip_intern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 struct ARegion;
11 struct MovieClip;
12 struct MovieTrackingMarker;
13 struct MovieTrackingTrack;
14 struct Scene;
15 struct ScrArea;
16 struct SpaceClip;
17 struct bContext;
18 struct wmOperatorType;
19 
20 /* channel heights */
21 #define CHANNEL_FIRST (-UI_TIME_SCRUB_MARGIN_Y - CHANNEL_HEIGHT_HALF - CHANNEL_SKIP)
22 #define CHANNEL_HEIGHT (0.8f * U.widget_unit)
23 #define CHANNEL_HEIGHT_HALF (0.4f * U.widget_unit)
24 #define CHANNEL_SKIP (0.1f * U.widget_unit)
25 #define CHANNEL_STEP (CHANNEL_HEIGHT + CHANNEL_SKIP)
26 
27 #define CHANNEL_PAD 4
28 
29 /* extra padding for lengths (to go under scrollers) */
30 #define EXTRA_SCROLL_PAD 100.0f
31 
32 #define STRIP_HEIGHT_HALF (0.25f * UI_UNIT_Y)
33 
34 /* internal exports only */
35 
36 /* clip_buttons.c */
37 
38 void ED_clip_buttons_register(struct ARegionType *art);
39 
40 /* clip_dopesheet_draw.c */
41 
42 void clip_draw_dopesheet_main(struct SpaceClip *sc, struct ARegion *region, struct Scene *scene);
43 void clip_draw_dopesheet_channels(const struct bContext *C, struct ARegion *region);
44 
45 /* clip_dopesheet_ops.c */
46 
49 
50 /* clip_draw.c */
51 
52 void clip_draw_main(const struct bContext *C, struct SpaceClip *sc, struct ARegion *region);
53 
54 /* draw grease pencil */
55 
56 void clip_draw_grease_pencil(struct bContext *C, int onlyv2d);
57 void clip_draw_cache_and_notes(const bContext *C, SpaceClip *sc, ARegion *region);
58 
59 /* clip_editor.c */
60 
61 void clip_start_prefetch_job(const struct bContext *C);
62 
63 /* clip_graph_draw.c */
64 
65 void clip_draw_graph(struct SpaceClip *sc, struct ARegion *region, struct Scene *scene);
66 
67 /* clip_graph_ops.c */
68 
69 void ED_clip_graph_center_current_frame(struct Scene *scene, struct ARegion *region);
70 
79 
80 /* clip_ops.c */
81 
82 void CLIP_OT_open(struct wmOperatorType *ot);
83 void CLIP_OT_reload(struct wmOperatorType *ot);
84 void CLIP_OT_view_pan(struct wmOperatorType *ot);
89 void CLIP_OT_view_all(struct wmOperatorType *ot);
94 void CLIP_OT_mode_set(struct wmOperatorType *ot);
95 
96 #ifdef WITH_INPUT_NDOF
97 void CLIP_OT_view_ndof(struct wmOperatorType *ot);
98 #endif
99 
100 void CLIP_OT_prefetch(struct wmOperatorType *ot);
101 
103 
104 void CLIP_OT_cursor_set(struct wmOperatorType *ot);
105 
107 
108 /* clip_toolbar.c */
109 
111 
112 /* clip_utils.c */
113 
114 typedef enum {
119 
120 typedef void (*ClipTrackValueCallback)(void *userdata,
121  struct MovieTrackingTrack *track,
122  struct MovieTrackingMarker *marker,
123  eClipCurveValueSource value_source,
124  int scene_framenr,
125  float val);
126 
127 typedef void (*ClipTrackValueSegmentStartCallback)(void *userdata,
128  struct MovieTrackingTrack *track,
129  eClipCurveValueSource value_source,
130  bool is_point);
131 
132 typedef void (*ClipTrackValueSegmentEndCallback)(void *userdata,
133  eClipCurveValueSource value_source);
134 
135 bool clip_graph_value_visible(struct SpaceClip *sc, eClipCurveValueSource value_source);
136 
138  struct MovieTrackingTrack *track,
139  void *userdata,
143 
145  bool selected_only,
146  bool include_hidden,
147  void *userdata,
151 
153  bool selected_only,
154  bool include_hidden,
155  void *userdata,
156  void (*func)(void *userdata, struct MovieTrackingMarker *marker));
157 
158 void clip_delete_track(struct bContext *C,
159  struct MovieClip *clip,
160  struct MovieTrackingTrack *track);
161 void clip_delete_marker(struct bContext *C,
162  struct MovieClip *clip,
163  struct MovieTrackingTrack *track,
164  struct MovieTrackingMarker *marker);
165 
166 void clip_delete_plane_track(struct bContext *C,
167  struct MovieClip *clip,
168  struct MovieTrackingPlaneTrack *plane_track);
169 
174  SpaceClip *sc, float x, float y, float *r_offset_x, float *r_offset_y);
175 void clip_view_center_to_point(SpaceClip *sc, float x, float y);
176 
178  const struct bContext *C, bool fit, float *r_offset_x, float *r_offset_y, float *r_zoom);
179 
185 
186 void clip_draw_sfra_efra(struct View2D *v2d, struct Scene *scene);
187 
188 /* tracking_ops.c */
189 
190 /* Find track which can be slid in a proximity of the given event.
191  * Uses the same distance tolerance rule as the "Slide Marker" operator. */
193  const float co[2]);
194 
195 void CLIP_OT_add_marker(struct wmOperatorType *ot);
199 
204 
208 
213 
215 
216 void CLIP_OT_set_origin(struct wmOperatorType *ot);
217 void CLIP_OT_set_plane(struct wmOperatorType *ot);
218 void CLIP_OT_set_axis(struct wmOperatorType *ot);
219 void CLIP_OT_set_scale(struct wmOperatorType *ot);
222 
224 
226 
227 void CLIP_OT_frame_jump(struct wmOperatorType *ot);
229 
231 
235 
239 
241 
244 
247 
250 
253 
256 
257 /* tracking_select.c */
258 
259 void CLIP_OT_select(struct wmOperatorType *ot);
260 void CLIP_OT_select_all(struct wmOperatorType *ot);
261 void CLIP_OT_select_box(struct wmOperatorType *ot);
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define C
Definition: RandGen.cpp:25
void CLIP_OT_tracking_object_remove(struct wmOperatorType *ot)
void CLIP_OT_graph_delete_curve(struct wmOperatorType *ot)
void CLIP_OT_frame_jump(struct wmOperatorType *ot)
void CLIP_OT_hide_tracks(struct wmOperatorType *ot)
void CLIP_OT_select_circle(struct wmOperatorType *ot)
void CLIP_OT_set_axis(struct wmOperatorType *ot)
void clip_draw_cache_and_notes(const bContext *C, SpaceClip *sc, ARegion *region)
Definition: clip_draw.c:1964
void CLIP_OT_view_zoom_out(struct wmOperatorType *ot)
Definition: clip_ops.c:822
void CLIP_OT_view_center_cursor(struct wmOperatorType *ot)
Definition: clip_ops.c:996
void CLIP_OT_stabilize_2d_add(struct wmOperatorType *ot)
void clip_graph_tracking_values_iterate_track(struct SpaceClip *sc, struct MovieTrackingTrack *track, void *userdata, ClipTrackValueCallback func, ClipTrackValueSegmentStartCallback segment_start, ClipTrackValueSegmentEndCallback segment_end)
Definition: clip_utils.c:237
void clip_draw_graph(struct SpaceClip *sc, struct ARegion *region, struct Scene *scene)
void CLIP_OT_track_copy_color(struct wmOperatorType *ot)
void(* ClipTrackValueSegmentStartCallback)(void *userdata, struct MovieTrackingTrack *track, eClipCurveValueSource value_source, bool is_point)
Definition: clip_intern.h:127
void CLIP_OT_set_scale(struct wmOperatorType *ot)
void clip_delete_marker(struct bContext *C, struct MovieClip *clip, struct MovieTrackingTrack *track, struct MovieTrackingMarker *marker)
Definition: clip_utils.c:350
void CLIP_OT_set_solution_scale(struct wmOperatorType *ot)
void CLIP_OT_graph_select(struct wmOperatorType *ot)
void CLIP_OT_view_all(struct wmOperatorType *ot)
Definition: clip_ops.c:957
void CLIP_OT_view_zoom_in(struct wmOperatorType *ot)
Definition: clip_ops.c:765
void CLIP_OT_clean_tracks(struct wmOperatorType *ot)
void CLIP_OT_view_zoom(wmOperatorType *ot)
Definition: clip_ops.c:699
void CLIP_OT_clear_solution(struct wmOperatorType *ot)
void CLIP_OT_reload(struct wmOperatorType *ot)
Definition: clip_ops.c:342
void clip_delete_track(struct bContext *C, struct MovieClip *clip, struct MovieTrackingTrack *track)
Definition: clip_utils.c:311
void ED_clip_graph_center_current_frame(struct Scene *scene, struct ARegion *region)
void CLIP_OT_solve_camera(struct wmOperatorType *ot)
void CLIP_OT_lock_selection_toggle(struct wmOperatorType *ot)
Definition: clip_ops.c:1848
void CLIP_OT_add_marker_at_click(struct wmOperatorType *ot)
Definition: tracking_ops.c:193
void CLIP_OT_delete_track(struct wmOperatorType *ot)
Definition: tracking_ops.c:250
void(* ClipTrackValueSegmentEndCallback)(void *userdata, eClipCurveValueSource value_source)
Definition: clip_intern.h:132
void CLIP_OT_select_lasso(struct wmOperatorType *ot)
void CLIP_OT_graph_view_all(struct wmOperatorType *ot)
void CLIP_OT_dopesheet_view_all(struct wmOperatorType *ot)
void CLIP_OT_graph_select_box(struct wmOperatorType *ot)
void CLIP_OT_view_zoom_ratio(struct wmOperatorType *ot)
Definition: clip_ops.c:874
void CLIP_OT_set_scene_frames(wmOperatorType *ot)
Definition: clip_ops.c:1748
void CLIP_OT_change_frame(wmOperatorType *ot)
Definition: clip_ops.c:1144
void CLIP_OT_select_grouped(struct wmOperatorType *ot)
void CLIP_OT_average_tracks(struct wmOperatorType *ot)
void clip_graph_tracking_values_iterate(struct SpaceClip *sc, bool selected_only, bool include_hidden, void *userdata, ClipTrackValueCallback func, ClipTrackValueSegmentStartCallback segment_start, ClipTrackValueSegmentEndCallback segment_end)
Definition: clip_utils.c:251
void ED_clip_buttons_register(struct ARegionType *art)
Definition: clip_buttons.c:70
void CLIP_OT_mode_set(struct wmOperatorType *ot)
Definition: clip_ops.c:1601
void clip_start_prefetch_job(const struct bContext *C)
void CLIP_OT_select(struct wmOperatorType *ot)
struct ARegion * ED_clip_has_properties_region(struct ScrArea *area)
Definition: clip_toolbar.c:28
bool clip_graph_value_visible(struct SpaceClip *sc, eClipCurveValueSource value_source)
Definition: clip_utils.c:42
void CLIP_OT_stabilize_2d_rotation_select(struct wmOperatorType *ot)
void CLIP_OT_open(struct wmOperatorType *ot)
Definition: clip_ops.c:295
void clip_view_center_to_point(SpaceClip *sc, float x, float y)
Definition: clip_utils.c:398
void clip_draw_main(const struct bContext *C, struct SpaceClip *sc, struct ARegion *region)
void CLIP_OT_refine_markers(struct wmOperatorType *ot)
void CLIP_OT_set_solver_keyframe(struct wmOperatorType *ot)
void CLIP_OT_tracking_object_new(struct wmOperatorType *ot)
void CLIP_OT_disable_markers(struct wmOperatorType *ot)
bool clip_view_has_locked_selection(const struct bContext *C)
void CLIP_OT_update_image_from_plane_marker(struct wmOperatorType *ot)
void CLIP_OT_clear_track_path(struct wmOperatorType *ot)
Definition: tracking_ops.c:978
bool clip_view_calculate_view_selection(const struct bContext *C, bool fit, float *r_offset_x, float *r_offset_y, float *r_zoom)
void CLIP_OT_track_markers(struct wmOperatorType *ot)
void CLIP_OT_delete_marker(struct wmOperatorType *ot)
Definition: tracking_ops.c:321
void CLIP_OT_graph_select_all_markers(struct wmOperatorType *ot)
void CLIP_OT_detect_features(struct wmOperatorType *ot)
void CLIP_OT_cursor_set(struct wmOperatorType *ot)
Definition: clip_ops.c:1798
void CLIP_OT_apply_solution_scale(struct wmOperatorType *ot)
void clip_draw_dopesheet_main(struct SpaceClip *sc, struct ARegion *region, struct Scene *scene)
void CLIP_OT_rebuild_proxy(struct wmOperatorType *ot)
Definition: clip_ops.c:1563
void CLIP_OT_set_origin(struct wmOperatorType *ot)
void CLIP_OT_slide_marker(struct wmOperatorType *ot)
Definition: tracking_ops.c:914
void clip_draw_grease_pencil(struct bContext *C, int onlyv2d)
Definition: clip_draw.c:1974
void CLIP_OT_select_box(struct wmOperatorType *ot)
void clip_draw_dopesheet_channels(const struct bContext *C, struct ARegion *region)
void clip_view_offset_for_center_to_point(SpaceClip *sc, float x, float y, float *r_offset_x, float *r_offset_y)
Definition: clip_utils.c:385
void CLIP_OT_view_selected(struct wmOperatorType *ot)
Definition: clip_ops.c:1028
void clip_graph_tracking_iterate(struct SpaceClip *sc, bool selected_only, bool include_hidden, void *userdata, void(*func)(void *userdata, struct MovieTrackingMarker *marker))
void CLIP_OT_stabilize_2d_rotation_remove(struct wmOperatorType *ot)
void CLIP_OT_create_plane_track(struct wmOperatorType *ot)
void CLIP_OT_slide_plane_marker(struct wmOperatorType *ot)
void CLIP_OT_stabilize_2d_select(struct wmOperatorType *ot)
void CLIP_OT_add_marker(struct wmOperatorType *ot)
Definition: tracking_ops.c:112
void CLIP_OT_hide_tracks_clear(struct wmOperatorType *ot)
eClipCurveValueSource
Definition: clip_intern.h:114
@ CLIP_VALUE_SOURCE_REPROJECTION_ERROR
Definition: clip_intern.h:117
@ CLIP_VALUE_SOURCE_SPEED_Y
Definition: clip_intern.h:116
@ CLIP_VALUE_SOURCE_SPEED_X
Definition: clip_intern.h:115
void CLIP_OT_prefetch(struct wmOperatorType *ot)
Definition: clip_ops.c:1707
void CLIP_OT_paste_tracks(struct wmOperatorType *ot)
void CLIP_OT_dopesheet_select_channel(struct wmOperatorType *ot)
void CLIP_OT_stabilize_2d_rotation_add(struct wmOperatorType *ot)
void CLIP_OT_graph_center_current_frame(struct wmOperatorType *ot)
void CLIP_OT_graph_delete_knot(struct wmOperatorType *ot)
void clip_delete_plane_track(struct bContext *C, struct MovieClip *clip, struct MovieTrackingPlaneTrack *plane_track)
Definition: clip_utils.c:365
void CLIP_OT_lock_tracks(struct wmOperatorType *ot)
void CLIP_OT_new_image_from_plane_marker(struct wmOperatorType *ot)
void CLIP_OT_select_all(struct wmOperatorType *ot)
void CLIP_OT_copy_tracks(struct wmOperatorType *ot)
struct MovieTrackingTrack * tracking_find_slidable_track_in_proximity(struct bContext *C, const float co[2])
Definition: tracking_ops.c:642
void CLIP_OT_set_plane(struct wmOperatorType *ot)
void CLIP_OT_view_pan(struct wmOperatorType *ot)
Definition: clip_ops.c:496
void(* ClipTrackValueCallback)(void *userdata, struct MovieTrackingTrack *track, struct MovieTrackingMarker *marker, eClipCurveValueSource value_source, int scene_framenr, float val)
Definition: clip_intern.h:120
void CLIP_OT_graph_disable_markers(struct wmOperatorType *ot)
void CLIP_OT_set_center_principal(struct wmOperatorType *ot)
void CLIP_OT_stabilize_2d_remove(struct wmOperatorType *ot)
void CLIP_OT_keyframe_delete(struct wmOperatorType *ot)
void CLIP_OT_join_tracks(struct wmOperatorType *ot)
void CLIP_OT_keyframe_insert(struct wmOperatorType *ot)
void clip_draw_sfra_efra(struct View2D *v2d, struct Scene *scene)
Definition: clip_utils.c:609
Scene scene
SyclQueue void void size_t num_bytes void
static void area(int d1, int d2, int e1, int e2, float weights[2])
wmOperatorType * ot
Definition: wm_files.c:3479