Blender
V2.93
source
blender
editors
space_clip
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
34
void
clip_tracking_clear_invisible_track_selection
(
SpaceClip
*sc,
MovieClip
*clip)
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
53
void
clip_tracking_hide_cursor
(
bContext
*
C
)
54
{
55
wmWindow
*win =
CTX_wm_window
(
C
);
56
WM_cursor_set
(win,
WM_CURSOR_NONE
);
57
}
58
59
void
clip_tracking_show_cursor
(
bContext
*
C
)
60
{
61
wmWindow
*win =
CTX_wm_window
(
C
);
62
WM_cursor_set
(win,
WM_CURSOR_DEFAULT
);
63
}
BKE_context.h
CTX_wm_window
struct wmWindow * CTX_wm_window(const bContext *C)
Definition:
context.c:699
BKE_tracking.h
BKE_tracking_get_active_tracks
struct ListBase * BKE_tracking_get_active_tracks(struct MovieTracking *tracking)
Definition:
tracking.c:365
BKE_tracking_track_flag_clear
void BKE_tracking_track_flag_clear(struct MovieTrackingTrack *track, int area, int flag)
Definition:
tracking.c:775
TRACK_AREA_SEARCH
#define TRACK_AREA_SEARCH
Definition:
BKE_tracking.h:522
TRACK_AREA_PAT
#define TRACK_AREA_PAT
Definition:
BKE_tracking.h:521
DNA_space_types.h
SC_SHOW_MARKER_SEARCH
@ SC_SHOW_MARKER_SEARCH
Definition:
DNA_space_types.h:1774
SC_SHOW_MARKER_PATTERN
@ SC_SHOW_MARKER_PATTERN
Definition:
DNA_space_types.h:1773
TRACK_HIDDEN
@ TRACK_HIDDEN
Definition:
DNA_tracking_types.h:492
C
#define C
Definition:
RandGen.cpp:39
WM_api.h
WM_types.h
NULL
return NULL
Definition:
bmesh_operator_api_inline.h:224
SELECT
#define SELECT
Definition:
curve_decimate.c:315
ListBase
Definition:
DNA_listBase.h:46
ListBase::first
void * first
Definition:
DNA_listBase.h:47
MovieClip
Definition:
DNA_movieclip_types.h:74
MovieClip::tracking
struct MovieTracking tracking
Definition:
DNA_movieclip_types.h:100
MovieTrackingTrack
Definition:
DNA_tracking_types.h:117
SpaceClip
Definition:
DNA_space_types.h:1709
SpaceClip::flag
int flag
Definition:
DNA_space_types.h:1735
bContext
Definition:
context.c:69
wmWindow
Definition:
DNA_windowmanager_types.h:228
tracking_ops_intern.h
clip_tracking_clear_invisible_track_selection
void clip_tracking_clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip)
Definition:
tracking_ops_utils.c:34
clip_tracking_hide_cursor
void clip_tracking_hide_cursor(bContext *C)
Definition:
tracking_ops_utils.c:53
clip_tracking_show_cursor
void clip_tracking_show_cursor(bContext *C)
Definition:
tracking_ops_utils.c:59
WM_cursor_set
void WM_cursor_set(wmWindow *win, int curs)
Definition:
wm_cursors.c:142
WM_CURSOR_DEFAULT
@ WM_CURSOR_DEFAULT
Definition:
wm_cursors.h:34
WM_CURSOR_NONE
@ WM_CURSOR_NONE
Definition:
wm_cursors.h:74
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1