Blender  V2.93
tracking_ops_utils.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2016 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include "DNA_space_types.h"
25 
26 #include "BKE_context.h"
27 #include "BKE_tracking.h"
28 
29 #include "WM_api.h"
30 #include "WM_types.h"
31 
32 #include "tracking_ops_intern.h" /* own include */
33 
35 {
36  ListBase *tracksbase = BKE_tracking_get_active_tracks(&clip->tracking);
37  int hidden = 0;
38  if ((sc->flag & SC_SHOW_MARKER_PATTERN) == 0) {
39  hidden |= TRACK_AREA_PAT;
40  }
41  if ((sc->flag & SC_SHOW_MARKER_SEARCH) == 0) {
42  hidden |= TRACK_AREA_SEARCH;
43  }
44  if (hidden) {
45  for (MovieTrackingTrack *track = tracksbase->first; track != NULL; track = track->next) {
46  if ((track->flag & TRACK_HIDDEN) == 0) {
47  BKE_tracking_track_flag_clear(track, hidden, SELECT);
48  }
49  }
50  }
51 }
52 
54 {
55  wmWindow *win = CTX_wm_window(C);
57 }
58 
60 {
61  wmWindow *win = CTX_wm_window(C);
63 }
struct wmWindow * CTX_wm_window(const bContext *C)
Definition: context.c:699
struct ListBase * BKE_tracking_get_active_tracks(struct MovieTracking *tracking)
Definition: tracking.c:365
void BKE_tracking_track_flag_clear(struct MovieTrackingTrack *track, int area, int flag)
Definition: tracking.c:775
#define TRACK_AREA_SEARCH
Definition: BKE_tracking.h:522
#define TRACK_AREA_PAT
Definition: BKE_tracking.h:521
@ SC_SHOW_MARKER_SEARCH
@ SC_SHOW_MARKER_PATTERN
@ TRACK_HIDDEN
#define C
Definition: RandGen.cpp:39
#define SELECT
void * first
Definition: DNA_listBase.h:47
struct MovieTracking tracking
void clip_tracking_clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip)
void clip_tracking_hide_cursor(bContext *C)
void clip_tracking_show_cursor(bContext *C)
void WM_cursor_set(wmWindow *win, int curs)
Definition: wm_cursors.c:142
@ WM_CURSOR_DEFAULT
Definition: wm_cursors.h:34
@ WM_CURSOR_NONE
Definition: wm_cursors.h:74