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) 2011 Blender Foundation.
19 * All rights reserved.
22 * Contributor(s): Blender Foundation,
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file blender/editors/mask/mask_intern.h
32 #ifndef __MASK_INTERN_H__
33 #define __MASK_INTERN_H__
37 struct wmOperatorType;
39 /* internal exports only */
42 void MASK_OT_add_vertex(struct wmOperatorType *ot);
43 void MASK_OT_add_feather_vertex(struct wmOperatorType *ot);
46 void MASK_OT_new(struct wmOperatorType *ot);
47 void MASK_OT_layer_new(struct wmOperatorType *ot);
48 void MASK_OT_layer_remove(struct wmOperatorType *ot);
49 void MASK_OT_cyclic_toggle(struct wmOperatorType *ot);
51 void MASK_OT_slide_point(struct wmOperatorType *ot);
53 void MASK_OT_delete(struct wmOperatorType *ot);
55 void MASK_OT_hide_view_clear(struct wmOperatorType *ot);
56 void MASK_OT_hide_view_set(struct wmOperatorType *ot);
57 void MASK_OT_feather_weight_clear(struct wmOperatorType *ot);
58 void MASK_OT_switch_direction(struct wmOperatorType *ot);
59 void MASK_OT_normals_make_consistent(struct wmOperatorType *ot);
61 void MASK_OT_handle_type_set(struct wmOperatorType *ot);
63 int ED_mask_feather_find_nearest(
64 struct bContext *C, struct Mask *mask, float normal_co[2], int threshold,
65 struct MaskLayer **masklay_r, struct MaskSpline **spline_r, struct MaskSplinePoint **point_r,
66 struct MaskSplinePointUW **uw_r, float *score);
68 struct MaskSplinePoint *ED_mask_point_find_nearest(
69 struct bContext *C, struct Mask *mask, float normal_co[2], int threshold,
70 struct MaskLayer **masklay_r, struct MaskSpline **spline_r, int *is_handle_r,
73 /* mask_relationships.c */
74 void MASK_OT_parent_set(struct wmOperatorType *ot);
75 void MASK_OT_parent_clear(struct wmOperatorType *ot);
78 void MASK_OT_select(struct wmOperatorType *ot);
79 void MASK_OT_select_all(struct wmOperatorType *ot);
81 void MASK_OT_select_border(struct wmOperatorType *ot);
82 void MASK_OT_select_lasso(struct wmOperatorType *ot);
83 void MASK_OT_select_circle(struct wmOperatorType *ot);
84 void MASK_OT_select_linked_pick(struct wmOperatorType *ot);
85 void MASK_OT_select_linked(struct wmOperatorType *ot);
87 int ED_mask_spline_select_check(struct MaskSpline *spline);
88 int ED_mask_layer_select_check(struct MaskLayer *masklay);
89 int ED_mask_select_check(struct Mask *mask);
91 void ED_mask_spline_select_set(struct MaskSpline *spline, const short do_select);
92 void ED_mask_layer_select_set(struct MaskLayer *masklay, const short do_select);
93 void ED_mask_select_toggle_all(struct Mask *mask, int action);
94 void ED_mask_select_flush_all(struct Mask *mask);
97 int ED_maskedit_poll(struct bContext *C);
98 int ED_maskedit_mask_poll(struct bContext *C);
100 void ED_mask_size(struct bContext *C, int *width, int *height);
101 void ED_mask_aspect(struct bContext *C, float *aspx, float *aspy);
103 void ED_mask_pixelspace_factor(struct bContext *C, float *scalex, float *scaley);
104 void ED_mask_mouse_pos(struct bContext *C, struct wmEvent *event, float co[2]);
106 void ED_mask_point_pos(struct bContext *C, float x, float y, float *xr, float *yr);
107 void ED_mask_point_pos__reverse(struct bContext *C, float x, float y, float *xr, float *yr);
109 /* mask_shapekey.c */
110 void MASK_OT_shape_key_insert(struct wmOperatorType *ot);
111 void MASK_OT_shape_key_clear(struct wmOperatorType *ot);
112 void MASK_OT_shape_key_feather_reset(struct wmOperatorType *ot);
114 #endif /* __MASK_INTERN_H__ */