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 
20 /** \file
21  * \ingroup spaction
22  */
23 
24 #pragma once
25 
26 struct ARegion;
27 struct ARegionType;
28 struct Object;
29 struct Scene;
30 struct SpaceAction;
31 struct bAnimContext;
32 struct bContext;
33 struct wmOperatorType;
34 
35 /* internal exports only */
36 
37 /* **************************************** */
38 /* space_action.c / action_buttons.c */
39 
40 void action_buttons_register(struct ARegionType *art);
41 
42 /* ***************************************** */
43 /* action_draw.c */
44 void draw_channel_names(struct bContext *C, struct bAnimContext *ac, struct ARegion *region);
45 void draw_channel_strips(struct bAnimContext *ac,
46                          struct SpaceAction *saction,
47                          struct ARegion *region);
48 
49 void timeline_draw_cache(struct SpaceAction *saction, struct Object *ob, struct Scene *scene);
50 
51 /* ***************************************** */
52 /* action_select.c */
53 
54 void ACTION_OT_select_all(struct wmOperatorType *ot);
55 void ACTION_OT_select_box(struct wmOperatorType *ot);
56 void ACTION_OT_select_lasso(struct wmOperatorType *ot);
57 void ACTION_OT_select_circle(struct wmOperatorType *ot);
58 void ACTION_OT_select_column(struct wmOperatorType *ot);
59 void ACTION_OT_select_linked(struct wmOperatorType *ot);
60 void ACTION_OT_select_more(struct wmOperatorType *ot);
61 void ACTION_OT_select_less(struct wmOperatorType *ot);
62 void ACTION_OT_select_leftright(struct wmOperatorType *ot);
63 void ACTION_OT_clickselect(struct wmOperatorType *ot);
64 
65 /* defines for left-right select tool */
66 enum eActKeys_LeftRightSelect_Mode {
67   ACTKEYS_LRSEL_TEST = 0,
68   ACTKEYS_LRSEL_LEFT,
69   ACTKEYS_LRSEL_RIGHT,
70 };
71 
72 /* defines for column-select mode */
73 enum eActKeys_ColumnSelect_Mode {
74   ACTKEYS_COLUMNSEL_KEYS = 0,
75   ACTKEYS_COLUMNSEL_CFRA,
76   ACTKEYS_COLUMNSEL_MARKERS_COLUMN,
77   ACTKEYS_COLUMNSEL_MARKERS_BETWEEN,
78 };
79 
80 /* ***************************************** */
81 /* action_edit.c */
82 
83 void ACTION_OT_previewrange_set(struct wmOperatorType *ot);
84 void ACTION_OT_view_all(struct wmOperatorType *ot);
85 void ACTION_OT_view_selected(struct wmOperatorType *ot);
86 void ACTION_OT_view_frame(struct wmOperatorType *ot);
87 
88 void ACTION_OT_copy(struct wmOperatorType *ot);
89 void ACTION_OT_paste(struct wmOperatorType *ot);
90 
91 void ACTION_OT_keyframe_insert(struct wmOperatorType *ot);
92 void ACTION_OT_duplicate(struct wmOperatorType *ot);
93 void ACTION_OT_delete(struct wmOperatorType *ot);
94 void ACTION_OT_clean(struct wmOperatorType *ot);
95 void ACTION_OT_sample(struct wmOperatorType *ot);
96 
97 void ACTION_OT_keyframe_type(struct wmOperatorType *ot);
98 void ACTION_OT_handle_type(struct wmOperatorType *ot);
99 void ACTION_OT_interpolation_type(struct wmOperatorType *ot);
100 void ACTION_OT_extrapolation_type(struct wmOperatorType *ot);
101 void ACTION_OT_easing_type(struct wmOperatorType *ot);
102 
103 void ACTION_OT_frame_jump(struct wmOperatorType *ot);
104 
105 void ACTION_OT_snap(struct wmOperatorType *ot);
106 void ACTION_OT_mirror(struct wmOperatorType *ot);
107 
108 void ACTION_OT_new(struct wmOperatorType *ot);
109 void ACTION_OT_unlink(struct wmOperatorType *ot);
110 
111 void ACTION_OT_push_down(struct wmOperatorType *ot);
112 void ACTION_OT_stash(struct wmOperatorType *ot);
113 void ACTION_OT_stash_and_create(struct wmOperatorType *ot);
114 
115 void ACTION_OT_layer_next(struct wmOperatorType *ot);
116 void ACTION_OT_layer_prev(struct wmOperatorType *ot);
117 
118 void ACTION_OT_markers_make_local(struct wmOperatorType *ot);
119 
120 /* defines for snap keyframes
121  * NOTE: keep in sync with eEditKeyframes_Snap (in ED_keyframes_edit.h)
122  */
123 enum eActKeys_Snap_Mode {
124   ACTKEYS_SNAP_CFRA = 1,
125   ACTKEYS_SNAP_NEAREST_FRAME,
126   ACTKEYS_SNAP_NEAREST_SECOND,
127   ACTKEYS_SNAP_NEAREST_MARKER,
128 };
129 
130 /* defines for mirror keyframes
131  * NOTE: keep in sync with eEditKeyframes_Mirror (in ED_keyframes_edit.h)
132  */
133 enum eActKeys_Mirror_Mode {
134   ACTKEYS_MIRROR_CFRA = 1,
135   ACTKEYS_MIRROR_YAXIS,
136   ACTKEYS_MIRROR_XAXIS,
137   ACTKEYS_MIRROR_MARKER,
138 };
139 
140 /* ***************************************** */
141 /* action_ops.c */
142 void action_operatortypes(void);
143 void action_keymap(struct wmKeyConfig *keyconf);
144