2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2012 Blender Foundation.
19 * All rights reserved.
21 * Contributor(s): Blender Foundation,
24 * ***** END GPL LICENSE BLOCK *****
36 struct MaskLayerShape;
40 void ED_mask_get_size(struct ScrArea *sa, int *width, int *height);
41 void ED_mask_zoom(struct ScrArea *sa, struct ARegion *ar, float *zoomx, float *zoomy);
42 void ED_mask_get_aspect(struct ScrArea *sa, struct ARegion *ar, float *aspx, float *aspy);
44 void ED_mask_pixelspace_factor(struct ScrArea *sa, struct ARegion *ar, float *scalex, float *scaley);
45 void ED_mask_mouse_pos(struct ScrArea *sa, struct ARegion *ar, const int mval[2], float co[2]);
47 void ED_mask_point_pos(struct ScrArea *sa, struct ARegion *ar, float x, float y, float *xr, float *yr);
48 void ED_mask_point_pos__reverse(struct ScrArea *sa, struct ARegion *ar,
49 float x, float y, float *xr, float *yr);
51 void ED_operatortypes_mask(void);
52 void ED_keymap_mask(struct wmKeyConfig *keyconf);
53 void ED_operatormacros_mask(void);
56 void ED_mask_draw(const struct bContext *C, const char draw_flag, const char draw_type);
57 void ED_mask_draw_region(struct Mask *mask, struct ARegion *ar,
58 const char draw_flag, const char draw_type,
59 const int width_i, const int height_i,
60 const float aspx, const float aspy,
61 const short do_scale_applied, const short do_draw_cb,
63 const struct bContext *C);
65 void ED_mask_draw_frames(struct Mask *mask, struct ARegion *ar, const int cfra, const int sfra, const int efra);
68 void ED_mask_layer_shape_auto_key(struct MaskLayer *masklay, const int frame);
69 int ED_mask_layer_shape_auto_key_all(struct Mask *mask, const int frame);
70 int ED_mask_layer_shape_auto_key_select(struct Mask *mask, const int frame);
72 /* ----------- Mask AnimEdit API ------------------ */
73 short ED_masklayer_frames_looper(struct MaskLayer *masklay, struct Scene *scene,
74 short (*masklay_shape_cb)(struct MaskLayerShape *, struct Scene *));
75 void ED_masklayer_make_cfra_list(struct MaskLayer *masklay, ListBase *elems, short onlysel);
77 short ED_masklayer_frame_select_check(struct MaskLayer *masklay);
78 void ED_masklayer_frame_select_set(struct MaskLayer *masklay, short mode);
79 void ED_masklayer_frames_select_border(struct MaskLayer *masklay, float min, float max, short select_mode);
80 void ED_mask_select_frames(struct MaskLayer *masklay, short select_mode);
81 void ED_mask_select_frame(struct MaskLayer *masklay, int selx, short select_mode);
83 void ED_masklayer_frames_delete(struct MaskLayer *masklay);
84 void ED_masklayer_frames_duplicate(struct MaskLayer *masklay);
86 void ED_masklayer_snap_frames(struct MaskLayer *masklay, struct Scene *scene, short mode);
89 void free_gpcopybuf(void);
90 void copy_gpdata(void);
91 void paste_gpdata(void);
93 void mirror_masklayer_frames(struct MaskLayer *masklay, short mode);
96 #endif /* __ED_MASK_H__ */