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) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file blender/editors/mesh/mesh_intern.h
33 /* Internal for editmesh_xxxx.c functions */
35 #ifndef __MESH_INTERN_H__
36 #define __MESH_INTERN_H__
44 struct EnumPropertyItem;
50 struct wmOperatorType;
52 /* ******************** editmesh_utils.c */
55 * ok: the EDBM module is for editmode bmesh stuff. in contrast, the
56 * BMEdit module is for code shared with blenkernel that concerns
57 * the BMEditMesh structure.
60 /*calls a bmesh op, reporting errors to the user, etc*/
61 int EDBM_op_callf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...);
63 int EDBM_op_call_and_selectf(struct BMEditMesh *em, struct wmOperator *op,
64 const char *selectslot, const char *fmt, ...);
66 /* same as above, but doesn't report errors.*/
67 int EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...);
69 /* these next two functions are the split version of EDBM_op_callf, so you can
70 * do stuff with a bmesh operator, after initializing it but before executing
73 * execute the operator with BM_Exec_Op */
74 int EDBM_op_init(struct BMEditMesh *em, struct BMOperator *bmop,
75 struct wmOperator *op, const char *fmt, ...);
76 /*cleans up after a bmesh operator*/
77 int EDBM_op_finish(struct BMEditMesh *em, struct BMOperator *bmop,
78 struct wmOperator *op, const int report);
80 void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
81 void EDBM_stats_update(struct BMEditMesh *em);
83 /* TODO, move to math_geometry.c */
84 float labda_PdistVL2Dfl(const float v1[3], const float v2[3], const float v3[3]);
86 /* ******************** editface.c */
88 void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc);
90 void MESH_OT_separate(struct wmOperatorType *ot);
92 /* ******************* editmesh_add.c */
93 void MESH_OT_primitive_plane_add(struct wmOperatorType *ot);
94 void MESH_OT_primitive_cube_add(struct wmOperatorType *ot);
95 void MESH_OT_primitive_circle_add(struct wmOperatorType *ot);
96 void MESH_OT_primitive_cylinder_add(struct wmOperatorType *ot);
97 void MESH_OT_primitive_cone_add(struct wmOperatorType *ot);
98 void MESH_OT_primitive_grid_add(struct wmOperatorType *ot);
99 void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot);
100 void MESH_OT_primitive_uv_sphere_add(struct wmOperatorType *ot);
101 void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot);
103 void MESH_OT_edge_face_add(struct wmOperatorType *ot);
104 void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot);
105 void MESH_OT_duplicate(struct wmOperatorType *ot);
107 extern int EM_view3d_poll(struct bContext *C);
109 struct wmKeyMap *knifetool_modal_keymap(struct wmKeyConfig *keyconf);
111 /* ******************* knifetool.c */
113 void MESH_OT_knife_cut(struct wmOperatorType *ot);
115 /* ******************* bmesh_select.c */
116 void MESH_OT_loop_select(struct wmOperatorType *ot);
117 void MESH_OT_select_all(struct wmOperatorType *ot);
118 void MESH_OT_select_interior_faces(struct wmOperatorType *ot);
119 void MESH_OT_select_more(struct wmOperatorType *ot);
120 void MESH_OT_select_less(struct wmOperatorType *ot);
121 void MESH_OT_select_non_manifold(struct wmOperatorType *ot);
122 void MESH_OT_select_linked(struct wmOperatorType *ot);
123 void MESH_OT_select_linked_pick(struct wmOperatorType *ot);
124 void MESH_OT_hide(struct wmOperatorType *ot);
125 void MESH_OT_reveal(struct wmOperatorType *ot);
126 void MESH_OT_select_by_number_vertices(struct wmOperatorType *ot);
127 void MESH_OT_select_loose_verts(struct wmOperatorType *ot);
128 void MESH_OT_select_mirror(struct wmOperatorType *ot);
129 void MESH_OT_normals_make_consistent(struct wmOperatorType *ot);
130 void MESH_OT_faces_select_linked_flat(struct wmOperatorType *ot);
131 void MESH_OT_edges_select_sharp(struct wmOperatorType *ot);
132 void MESH_OT_select_shortest_path(struct wmOperatorType *ot);
133 void MESH_OT_select_similar(struct wmOperatorType *ot);
134 void MESH_OT_select_random(struct wmOperatorType *ot);
135 void MESH_OT_loop_multi_select(struct wmOperatorType *ot);
136 void MESH_OT_mark_seam(struct wmOperatorType *ot);
137 void MESH_OT_mark_sharp(struct wmOperatorType *ot);
138 void MESH_OT_mark_freestyle_edge(struct wmOperatorType *ot);
139 void MESH_OT_vertices_smooth(struct wmOperatorType *ot);
140 void MESH_OT_noise(struct wmOperatorType *ot);
141 void MESH_OT_flip_normals(struct wmOperatorType *ot);
142 void MESH_OT_solidify(struct wmOperatorType *ot);
143 void MESH_OT_select_nth(struct wmOperatorType *ot);
144 void MESH_OT_select_next_loop(struct wmOperatorType *ot);
146 extern struct EnumPropertyItem *corner_type_items;
148 void MESH_OT_merge(struct wmOperatorType *ot);
149 void MESH_OT_subdivide(struct wmOperatorType *ot);
150 void MESH_OT_remove_doubles(struct wmOperatorType *ot);
151 void MESH_OT_vertices_randomize(struct wmOperatorType *ot);
152 void MESH_OT_vertices_sort(struct wmOperatorType *ot);
153 void MESH_OT_spin(struct wmOperatorType *ot);
154 void MESH_OT_screw(struct wmOperatorType *ot);
156 void MESH_OT_fill(struct wmOperatorType *ot);
157 void MESH_OT_beautify_fill(struct wmOperatorType *ot);
158 void MESH_OT_quads_convert_to_tris(struct wmOperatorType *ot);
159 void MESH_OT_tris_convert_to_quads(struct wmOperatorType *ot);
160 void MESH_OT_dissolve(struct wmOperatorType *ot);
161 void MESH_OT_dissolve_limited(struct wmOperatorType *ot);
162 void MESH_OT_faces_shade_smooth(struct wmOperatorType *ot);
163 void MESH_OT_faces_shade_flat(struct wmOperatorType *ot);
164 void MESH_OT_split(struct wmOperatorType *ot);
165 void MESH_OT_extrude_repeat(struct wmOperatorType *ot);
166 void MESH_OT_edge_rotate(struct wmOperatorType *ot);
167 void MESH_OT_select_vertex_path(struct wmOperatorType *ot);
168 void MESH_OT_loop_to_region(struct wmOperatorType *ot);
169 void MESH_OT_region_to_loop(struct wmOperatorType *ot);
170 void MESH_OT_select_axis(struct wmOperatorType *ot);
172 void MESH_OT_uvs_rotate(struct wmOperatorType *ot);
173 //void MESH_OT_uvs_mirror(struct wmOperatorType *ot);
174 void MESH_OT_uvs_reverse(struct wmOperatorType *ot);
175 void MESH_OT_colors_rotate(struct wmOperatorType *ot);
176 //void MESH_OT_colors_mirror(struct wmOperatorType *ot);
178 void MESH_OT_colors_reverse(struct wmOperatorType *ot);
180 void MESH_OT_delete(struct wmOperatorType *ot);
181 void MESH_OT_edge_collapse(struct wmOperatorType *ot);
182 void MESH_OT_edge_collapse_loop(struct wmOperatorType *ot);
183 void MESH_OT_rip(struct wmOperatorType *ot);
185 void MESH_OT_shape_propagate_to_all(struct wmOperatorType *ot);
186 void MESH_OT_blend_from_shape(struct wmOperatorType *ot);
187 void MESH_OT_sort_faces(struct wmOperatorType *ot);
188 void MESH_OT_mark_freestyle_face(struct wmOperatorType *ot);
190 /* ******************* mesh_data.c */
192 void MESH_OT_uv_texture_add(struct wmOperatorType *ot);
193 void MESH_OT_uv_texture_remove(struct wmOperatorType *ot);
194 void MESH_OT_vertex_color_add(struct wmOperatorType *ot);
195 void MESH_OT_vertex_color_remove(struct wmOperatorType *ot);
196 void MESH_OT_sticky_add(struct wmOperatorType *ot);
197 void MESH_OT_sticky_remove(struct wmOperatorType *ot);
198 void MESH_OT_drop_named_image(struct wmOperatorType *ot);
200 /* ************* bmesh_tools.c ***********/
201 void MESH_OT_vert_connect(struct wmOperatorType *ot);
202 void MESH_OT_edge_split(struct wmOperatorType *ot);
203 void MESH_OT_extrude_region(struct wmOperatorType *ot);
204 void MESH_OT_extrude_verts_indiv(struct wmOperatorType *ot);
205 void MESH_OT_extrude_edges_indiv(struct wmOperatorType *ot);
206 void MESH_OT_extrude_faces_indiv(struct wmOperatorType *ot);
208 void MESH_OT_edgering_select(struct wmOperatorType *ot);
209 void MESH_OT_loopcut(struct wmOperatorType *ot);
211 void MESH_OT_knife_tool(struct wmOperatorType *ot);
212 void MESH_OT_bevel(struct wmOperatorType *ot);
214 void MESH_OT_bridge_edge_loops(struct wmOperatorType *ot);
215 void MESH_OT_inset(struct wmOperatorType *ot);
216 void MESH_OT_vert_slide(struct wmOperatorType *ot);
218 /* ******************* mesh_navmesh.c */
219 void MESH_OT_navmesh_make(struct wmOperatorType *ot);
220 void MESH_OT_navmesh_face_copy(struct wmOperatorType *ot);
221 void MESH_OT_navmesh_face_add(struct wmOperatorType *ot);
222 void MESH_OT_navmesh_reset(struct wmOperatorType *ot);
223 void MESH_OT_navmesh_clear(struct wmOperatorType *ot);
225 #endif // __MESH_INTERN_H__