|
Blender
V2.59
|
00001 /* 00002 * $Id: graph_intern.h 35765 2011-03-25 03:58:21Z aligorith $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2008 Blender Foundation. 00021 * All rights reserved. 00022 * 00023 * 00024 * Contributor(s): Blender Foundation 00025 * 00026 * ***** END GPL LICENSE BLOCK ***** 00027 */ 00028 00033 #ifndef ED_GRAPH_INTERN_H 00034 #define ED_GRAPH_INTERN_H 00035 00036 struct bContext; 00037 struct wmWindowManager; 00038 struct bAnimContext; 00039 struct bAnimListElem; 00040 struct FCurve; 00041 struct FModifier; 00042 struct SpaceIpo; 00043 struct ScrArea; 00044 struct ARegion; 00045 struct ARegionType; 00046 struct View2DGrid; 00047 00048 /* internal exports only */ 00049 00050 /* ***************************************** */ 00051 /* space_graph.c */ 00052 struct ARegion *graph_has_buttons_region(struct ScrArea *sa); 00053 00054 /* ***************************************** */ 00055 /* graph_draw.c */ 00056 void graph_draw_channel_names(struct bContext *C, struct bAnimContext *ac, struct ARegion *ar); 00057 00058 void graph_draw_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar, struct View2DGrid *grid, short sel); 00059 void graph_draw_ghost_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar); 00060 00061 /* ***************************************** */ 00062 /* graph_header.c */ 00063 void graph_header_buttons(const bContext *C, struct ARegion *ar); 00064 00065 /* ***************************************** */ 00066 /* graph_select.c */ 00067 00068 void GRAPH_OT_select_all_toggle(struct wmOperatorType *ot); 00069 void GRAPH_OT_select_border(struct wmOperatorType *ot); 00070 void GRAPH_OT_select_column(struct wmOperatorType *ot); 00071 void GRAPH_OT_select_linked(struct wmOperatorType *ot); 00072 void GRAPH_OT_select_more(struct wmOperatorType *ot); 00073 void GRAPH_OT_select_less(struct wmOperatorType *ot); 00074 void GRAPH_OT_select_leftright(struct wmOperatorType *ot); 00075 void GRAPH_OT_clickselect(struct wmOperatorType *ot); 00076 00077 /* defines for left-right select tool */ 00078 enum { 00079 GRAPHKEYS_LRSEL_TEST = 0, 00080 GRAPHKEYS_LRSEL_LEFT, 00081 GRAPHKEYS_LRSEL_RIGHT 00082 } eGraphKeys_LeftRightSelect_Mode; 00083 00084 /* defines for column-select mode */ 00085 enum { 00086 GRAPHKEYS_COLUMNSEL_KEYS = 0, 00087 GRAPHKEYS_COLUMNSEL_CFRA, 00088 GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, 00089 GRAPHKEYS_COLUMNSEL_MARKERS_BETWEEN, 00090 } eGraphKeys_ColumnSelect_Mode; 00091 00092 /* ***************************************** */ 00093 /* graph_edit.c */ 00094 00095 void get_graph_keyframe_extents (struct bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const short do_selected); 00096 00097 void GRAPH_OT_previewrange_set(struct wmOperatorType *ot); 00098 void GRAPH_OT_view_all(struct wmOperatorType *ot); 00099 void GRAPH_OT_view_selected(struct wmOperatorType *ot); 00100 00101 void GRAPH_OT_click_insert(struct wmOperatorType *ot); 00102 void GRAPH_OT_keyframe_insert(struct wmOperatorType *ot); 00103 00104 void GRAPH_OT_copy(struct wmOperatorType *ot); 00105 void GRAPH_OT_paste(struct wmOperatorType *ot); 00106 00107 void GRAPH_OT_duplicate(struct wmOperatorType *ot); 00108 void GRAPH_OT_delete(struct wmOperatorType *ot); 00109 void GRAPH_OT_clean(struct wmOperatorType *ot); 00110 void GRAPH_OT_sample(struct wmOperatorType *ot); 00111 void GRAPH_OT_bake(struct wmOperatorType *ot); 00112 void GRAPH_OT_sound_bake(struct wmOperatorType *ot); 00113 void GRAPH_OT_smooth(struct wmOperatorType *ot); 00114 void GRAPH_OT_euler_filter(struct wmOperatorType *ot); 00115 00116 void GRAPH_OT_handle_type(struct wmOperatorType *ot); 00117 void GRAPH_OT_interpolation_type(struct wmOperatorType *ot); 00118 void GRAPH_OT_extrapolation_type(struct wmOperatorType *ot); 00119 00120 void GRAPH_OT_frame_jump(struct wmOperatorType *ot); 00121 void GRAPH_OT_snap(struct wmOperatorType *ot); 00122 void GRAPH_OT_mirror(struct wmOperatorType *ot); 00123 00124 /* defines for snap keyframes 00125 * NOTE: keep in sync with eEditKeyframes_Snap (in ED_keyframes_edit.h) 00126 */ 00127 enum { 00128 GRAPHKEYS_SNAP_CFRA = 1, 00129 GRAPHKEYS_SNAP_NEAREST_FRAME, 00130 GRAPHKEYS_SNAP_NEAREST_SECOND, 00131 GRAPHKEYS_SNAP_NEAREST_MARKER, 00132 GRAPHKEYS_SNAP_HORIZONTAL, 00133 GRAPHKEYS_SNAP_VALUE, 00134 } eGraphKeys_Snap_Mode; 00135 00136 /* defines for mirror keyframes 00137 * NOTE: keep in sync with eEditKeyframes_Mirror (in ED_keyframes_edit.h) 00138 */ 00139 enum { 00140 GRAPHKEYS_MIRROR_CFRA = 1, 00141 GRAPHKEYS_MIRROR_YAXIS, 00142 GRAPHKEYS_MIRROR_XAXIS, 00143 GRAPHKEYS_MIRROR_MARKER, 00144 GRAPHKEYS_MIRROR_VALUE, 00145 } eGraphKeys_Mirror_Mode; 00146 00147 /* ----------- */ 00148 00149 void GRAPH_OT_fmodifier_add(struct wmOperatorType *ot); 00150 void GRAPH_OT_fmodifier_copy(struct wmOperatorType *ot); 00151 void GRAPH_OT_fmodifier_paste(struct wmOperatorType *ot); 00152 00153 /* ----------- */ 00154 00155 void GRAPH_OT_ghost_curves_create(struct wmOperatorType *ot); 00156 void GRAPH_OT_ghost_curves_clear(struct wmOperatorType *ot); 00157 00158 /* ***************************************** */ 00159 /* graph_buttons.c */ 00160 00161 void GRAPH_OT_properties(struct wmOperatorType *ot); 00162 void graph_buttons_register(struct ARegionType *art); 00163 00164 /* ***************************************** */ 00165 /* graph_utils.c */ 00166 00167 struct bAnimListElem *get_active_fcurve_channel(struct bAnimContext *ac); 00168 00169 short fcurve_needs_draw_fmodifier_controls(struct FCurve *fcu, struct FModifier *fcm); 00170 00171 int graphop_visible_keyframes_poll(struct bContext *C); 00172 int graphop_editable_keyframes_poll(struct bContext *C); 00173 int graphop_active_fcurve_poll(struct bContext *C); 00174 int graphop_selected_fcurve_poll(struct bContext *C); 00175 00176 /* ***************************************** */ 00177 /* graph_ops.c */ 00178 void graphedit_keymap(struct wmKeyConfig *keyconf); 00179 void graphedit_operatortypes(void); 00180 00181 00182 #endif /* ED_GRAPH_INTERN_H */ 00183