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