Blender  V2.93
ED_markers.h
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) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 struct Scene;
31 struct TimeMarker;
32 struct bAnimContext;
33 struct bContext;
34 struct wmKeyConfig;
35 
36 /* Drawing API ------------------------------ */
37 
38 /* flags for drawing markers */
39 enum {
40  DRAW_MARKERS_LINES = (1 << 0),
41  DRAW_MARKERS_LOCAL = (1 << 1),
42  DRAW_MARKERS_MARGIN = (1 << 2),
43 };
44 
45 void ED_markers_draw(const struct bContext *C, int flag);
46 
47 /* Backend API ----------------------------- */
48 
51 
53  ListBase *markers, struct Scene *scene, int mode, float value, char side);
54 
57 
58 void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *last);
59 
60 void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel);
61 
62 void ED_markers_deselect_all(ListBase *markers, int action);
63 
65 
66 /* Operators ------------------------------ */
67 
68 /* called in screen_ops.c:ED_operatortypes_screen() */
69 void ED_operatortypes_marker(void);
70 /* called in screen_ops.c:ED_keymap_screen() */
71 void ED_keymap_marker(struct wmKeyConfig *keyconf);
72 
73 /* debugging only */
75 
76 #ifdef __cplusplus
77 }
78 #endif
void ED_keymap_marker(struct wmKeyConfig *keyconf)
struct TimeMarker * ED_markers_get_first_selected(ListBase *markers)
Definition: anim_markers.c:379
void ED_markers_draw(const struct bContext *C, int flag)
@ DRAW_MARKERS_MARGIN
Definition: ED_markers.h:42
@ DRAW_MARKERS_LOCAL
Definition: ED_markers.h:41
@ DRAW_MARKERS_LINES
Definition: ED_markers.h:40
void debug_markers_print_list(struct ListBase *markers)
Definition: anim_markers.c:400
ListBase * ED_animcontext_get_markers(const struct bAnimContext *ac)
int ED_markers_find_nearest_marker_time(ListBase *markers, float x)
Definition: anim_markers.c:193
void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *last)
Definition: anim_markers.c:199
void ED_operatortypes_marker(void)
struct TimeMarker * ED_markers_find_nearest_marker(ListBase *markers, float x)
Definition: anim_markers.c:173
ListBase * ED_context_get_markers(const struct bContext *C)
void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel)
Definition: anim_markers.c:330
void ED_markers_deselect_all(ListBase *markers, int action)
Definition: anim_markers.c:354
int ED_markers_post_apply_transform(ListBase *markers, struct Scene *scene, int mode, float value, char side)
Definition: anim_markers.c:130
#define C
Definition: RandGen.cpp:39
Scene scene
const vector< Marker > & markers