Blender V4.3
tracking_ops_intern.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2016 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "BLI_utildefines.h"
12
13#include "BKE_tracking.h"
14
15struct ListBase;
16struct MovieClip;
17struct SpaceClip;
18struct bContext;
23
24/* tracking_utils.c */
25
27
30
31/* tracking_select.h */
32
34void ed_tracking_deselect_all_plane_tracks(ListBase *plane_tracks_base);
35
37 /* Ignore tracks which are not selected */
39
40 /* Ignore tracks which are locked. */
42
43 /* Ignore markers which are disabled. */
45};
46
52
55
56 /* Position of the marker (when area is TRACK_AREA_POINT).
57 * Position of the pattern corner when area is TRACK_AREA_PAT and corner != -1. */
59
60 /* Size and offset of the search area. */
63
64 /* "Widget" used to define pattern rotation and scale. */
66
67 /* Edge of pattern or search area. */
69};
70
74
75 /* Picked area of the track. Is a single element from eTrackArea (no multiple choices are
76 * possible). */
79
80 /* When a pattern corner is picked is 0-based index of the corner.
81 * Otherwise is -1. */
83
84 /* Distance to the pick measured in squared pixels. */
86};
87
88/* Pick point track which is closest to the given coordinate.
89 * Operates in the original non-stabilized and non-un-distorted coordinates. */
91 bContext *C,
92 const float co[2]);
93
94/* Returns true when the pick did not pick anything. */
96{
97 return pick->track == nullptr;
98}
99
100/* Check whether the point track pick corresponds to a part of the marker which can be sued
101 * for slide operation. */
103 const PointTrackPick *pick);
104
108
109 /* When not equal to -1 denotes the index of the corner which was the closest to the requested
110 * coordinate. */
112
113 /* Distance to the pick measured in squared pixels. */
115};
116
117/* Pick plane track which is closest to the given coordinate.
118 * Operates in the original non-stabilized and non-un-distorted coordinates. */
120 struct bContext *C,
121 const float co[2]);
122
123/* Returns true when the pick did not pick anything. */
125{
126 return pick->plane_track == nullptr;
127}
128
129/* Check whether the plane track pick corresponds to a part of the marker which can be sued
130 * for slide operation. */
132
134 /* NOTE: At maximum one of these picks will have a track. */
137};
138
139/* Pick closest point or plane track (whichever is the closest to the given coordinate).
140 * Operates in the original non-stabilized and non-un-distorted coordinates. */
142 bContext *C,
143 const float co[2]);
144
145/* Returns true when the pick did not pick anything. */
151
152/* Check whether any of the pick can be used for the marker slide operation. */
eTrackArea
#define BLI_INLINE
CCL_NAMESPACE_BEGIN struct Options options
MovieTrackingPlaneTrack * plane_track
MovieTrackingPlaneMarker * plane_marker
MovieTrackingMarker * marker
eTrackPickAreaDetail area_detail
MovieTrackingTrack * track
PlaneTrackPick plane_track_pick
PointTrackPick point_track_pick
eTrackPickAreaDetail
@ TRACK_PICK_AREA_DETAIL_EDGE
@ TRACK_PICK_AREA_DETAIL_POSITION
@ TRACK_PICK_AREA_DETAIL_TILT_SIZE
@ TRACK_PICK_AREA_DETAIL_NONE
@ TRACK_PICK_AREA_DETAIL_SIZE
@ TRACK_PICK_AREA_DETAIL_OFFSET
void clip_tracking_clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip)
PlaneTrackPick ed_tracking_pick_plane_track(const TrackPickOptions *options, struct bContext *C, const float co[2])
TrackingPick ed_tracking_pick_closest(const TrackPickOptions *options, bContext *C, const float co[2])
void ed_tracking_deselect_all_tracks(ListBase *tracks_base)
BLI_INLINE bool ed_tracking_plane_track_pick_empty(const PlaneTrackPick *pick)
void clip_tracking_hide_cursor(bContext *C)
void clip_tracking_show_cursor(bContext *C)
BLI_INLINE bool ed_tracking_point_track_pick_empty(const PointTrackPick *pick)
bool ed_tracking_plane_track_pick_can_slide(const PlaneTrackPick *pick)
BLI_INLINE bool ed_tracking_pick_can_slide(const SpaceClip *space_clip, const TrackingPick *pick)
BLI_INLINE bool ed_tracking_pick_empty(const TrackingPick *pick)
void ed_tracking_deselect_all_plane_tracks(ListBase *plane_tracks_base)
BLI_INLINE TrackPickOptions ed_tracking_pick_options_defaults()
PointTrackPick ed_tracking_pick_point_track(const TrackPickOptions *options, bContext *C, const float co[2])
bool ed_tracking_point_track_pick_can_slide(const SpaceClip *space_clip, const PointTrackPick *pick)