Blender V5.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
8
9#pragma once
10
12
13#include "DNA_listBase.h"
14
15#include "BKE_tracking.hh"
16
17namespace blender {
18
19struct MovieClip;
20struct SpaceClip;
21struct bContext;
26
27/* tracking_ops_utils.cc */
28
30
33
34/* tracking_select.h */
35
36void ed_tracking_deselect_all_tracks(ListBaseT<MovieTrackingTrack> *tracks_base);
37void ed_tracking_deselect_all_plane_tracks(ListBaseT<MovieTrackingPlaneTrack> *plane_tracks_base);
38
40 /* Ignore tracks which are not selected */
42
43 /* Ignore tracks which are locked. */
45
46 /* Ignore markers which are disabled. */
48};
49
55
58
59 /* Position of the marker (when area is TRACK_AREA_POINT).
60 * Position of the pattern corner when area is TRACK_AREA_PAT and corner != -1. */
62
63 /* Size and offset of the search area. */
66
67 /* "Widget" used to define pattern rotation and scale. */
69
70 /* Edge of pattern or search area. */
72};
73
77
78 /* Picked area of the track. Is a single element from eTrackArea (no multiple choices are
79 * possible). */
82
83 /* When a pattern corner is picked is 0-based index of the corner.
84 * Otherwise is -1. */
86
87 /* Distance to the pick measured in squared pixels. */
89};
90
91/* Pick point track which is closest to the given coordinate.
92 * Operates in the original non-stabilized and non-un-distorted coordinates. */
94 bContext *C,
95 const float co[2]);
96
97/* Returns true when the pick did not pick anything. */
99{
100 return pick->track == nullptr;
101}
102
103/* Check whether the point track pick corresponds to a part of the marker which can be sued
104 * for slide operation. */
105bool ed_tracking_point_track_pick_can_slide(const SpaceClip *space_clip,
106 const PointTrackPick *pick);
107
111
112 /* When not equal to -1 denotes the index of the corner which was the closest to the requested
113 * coordinate. */
115
116 /* Distance to the pick measured in squared pixels. */
118};
119
120/* Pick plane track which is closest to the given coordinate.
121 * Operates in the original non-stabilized and non-un-distorted coordinates. */
123 struct bContext *C,
124 const float co[2]);
125
126/* Returns true when the pick did not pick anything. */
128{
129 return pick->plane_track == nullptr;
130}
131
132/* Check whether the plane track pick corresponds to a part of the marker which can be sued
133 * for slide operation. */
134bool ed_tracking_plane_track_pick_can_slide(const PlaneTrackPick *pick);
135
137 /* NOTE: At maximum one of these picks will have a track. */
140};
141
142/* Pick closest point or plane track (whichever is the closest to the given coordinate).
143 * Operates in the original non-stabilized and non-un-distorted coordinates. */
145 bContext *C,
146 const float co[2]);
147
148/* Returns true when the pick did not pick anything. */
154
155/* Check whether any of the pick can be used for the marker slide operation. */
161
162} // namespace blender
These structs are the foundation for all linked lists in the library system.
#define C
Definition RandGen.cpp:29
#define BLI_INLINE
CCL_NAMESPACE_BEGIN struct Options options
BMesh Iterators.
void clip_tracking_hide_cursor(bContext *C)
void ed_tracking_deselect_all_tracks(ListBaseT< MovieTrackingTrack > *tracks_base)
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)
BLI_INLINE bool ed_tracking_pick_empty(const TrackingPick *pick)
BLI_INLINE TrackPickOptions ed_tracking_pick_options_defaults()
BLI_INLINE bool ed_tracking_point_track_pick_empty(const PointTrackPick *pick)
void clip_tracking_show_cursor(bContext *C)
PlaneTrackPick ed_tracking_pick_plane_track(const TrackPickOptions *options, struct bContext *C, const float co[2])
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_plane_track_pick_empty(const PlaneTrackPick *pick)
void clip_tracking_clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip)
void ed_tracking_deselect_all_plane_tracks(ListBaseT< MovieTrackingPlaneTrack > *plane_tracks_base)
@ TRACK_PICK_AREA_DETAIL_TILT_SIZE
@ TRACK_PICK_AREA_DETAIL_POSITION
@ TRACK_PICK_AREA_DETAIL_OFFSET
TrackingPick ed_tracking_pick_closest(const TrackPickOptions *options, bContext *C, const float co[2])
MovieTrackingPlaneMarker * plane_marker
MovieTrackingPlaneTrack * plane_track
eTrackPickAreaDetail area_detail
MovieTrackingMarker * marker
MovieTrackingTrack * track