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__
38 struct wmOperatorType;
40 /* internal exports only */
43 void MASK_OT_add_vertex(struct wmOperatorType *ot);
44 void MASK_OT_add_feather_vertex(struct wmOperatorType *ot);
45 void MASK_OT_primitive_circle_add(struct wmOperatorType *ot);
46 void MASK_OT_primitive_square_add(struct wmOperatorType *ot);
49 struct Mask *ED_mask_new(struct bContext *C, const char *name);
50 struct MaskLayer *ED_mask_layer_ensure(struct bContext *C);
52 void MASK_OT_new(struct wmOperatorType *ot);
53 void MASK_OT_layer_new(struct wmOperatorType *ot);
54 void MASK_OT_layer_remove(struct wmOperatorType *ot);
55 void MASK_OT_cyclic_toggle(struct wmOperatorType *ot);
57 void MASK_OT_slide_point(struct wmOperatorType *ot);
59 void MASK_OT_delete(struct wmOperatorType *ot);
61 void MASK_OT_hide_view_clear(struct wmOperatorType *ot);
62 void MASK_OT_hide_view_set(struct wmOperatorType *ot);
63 void MASK_OT_feather_weight_clear(struct wmOperatorType *ot);
64 void MASK_OT_switch_direction(struct wmOperatorType *ot);
65 void MASK_OT_normals_make_consistent(struct wmOperatorType *ot);
67 void MASK_OT_handle_type_set(struct wmOperatorType *ot);
69 bool ED_mask_feather_find_nearest(
70 const struct bContext *C, struct Mask *mask, const float normal_co[2], const float threshold,
71 struct MaskLayer **masklay_r, struct MaskSpline **spline_r, struct MaskSplinePoint **point_r,
72 struct MaskSplinePointUW **uw_r, float *score);
74 struct MaskSplinePoint *ED_mask_point_find_nearest(
75 const struct bContext *C, struct Mask *mask, const float normal_co[2], const float threshold,
76 struct MaskLayer **masklay_r, struct MaskSpline **spline_r, eMaskWhichHandle *which_handle_r,
79 void MASK_OT_layer_move(struct wmOperatorType *ot);
81 void MASK_OT_duplicate(struct wmOperatorType *ot);
82 void MASK_OT_copy_splines(struct wmOperatorType *ot);
83 void MASK_OT_paste_splines(struct wmOperatorType *ot);
85 /* mask_relationships.c */
86 void MASK_OT_parent_set(struct wmOperatorType *ot);
87 void MASK_OT_parent_clear(struct wmOperatorType *ot);
90 void MASK_OT_select(struct wmOperatorType *ot);
91 void MASK_OT_select_all(struct wmOperatorType *ot);
93 void MASK_OT_select_border(struct wmOperatorType *ot);
94 void MASK_OT_select_lasso(struct wmOperatorType *ot);
95 void MASK_OT_select_circle(struct wmOperatorType *ot);
96 void MASK_OT_select_linked_pick(struct wmOperatorType *ot);
97 void MASK_OT_select_linked(struct wmOperatorType *ot);
98 void MASK_OT_select_more(struct wmOperatorType *ot);
99 void MASK_OT_select_less(struct wmOperatorType *ot);
101 bool ED_mask_spline_select_check(struct MaskSpline *spline);
102 bool ED_mask_layer_select_check(struct MaskLayer *masklay);
103 bool ED_mask_select_check(struct Mask *mask);
105 void ED_mask_spline_select_set(struct MaskSpline *spline, const short do_select);
106 void ED_mask_layer_select_set(struct MaskLayer *masklay, const short do_select);
107 void ED_mask_select_toggle_all(struct Mask *mask, int action);
108 void ED_mask_select_flush_all(struct Mask *mask);
111 int ED_maskedit_poll(struct bContext *C);
112 int ED_maskedit_mask_poll(struct bContext *C);
114 /* mask_shapekey.c */
115 void MASK_OT_shape_key_insert(struct wmOperatorType *ot);
116 void MASK_OT_shape_key_clear(struct wmOperatorType *ot);
117 void MASK_OT_shape_key_feather_reset(struct wmOperatorType *ot);
118 void MASK_OT_shape_key_rekey(struct wmOperatorType *ot);
120 #endif /* __MASK_INTERN_H__ */