Merged changes in the trunk up to revision 51853.
[blender-staging.git] / source / blender / bmesh / intern / bmesh_operators.h
1 /*
2  * ***** BEGIN GPL LICENSE BLOCK *****
3  *
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.
8  *
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.
13  *
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.
17  *
18  * Contributor(s): Joseph Eagar.
19  *
20  * ***** END GPL LICENSE BLOCK *****
21  */
22
23 #ifndef __BMESH_OPERATORS_H__
24 #define __BMESH_OPERATORS_H__
25
26 /** \file blender/bmesh/intern/bmesh_operators.h
27  *  \ingroup bmesh
28  */
29
30 /*see comments in intern/bmesh_opdefines.c for documentation of specific operators*/
31
32 /*--------defines/enumerations for specific operators-------*/
33
34 /*quad innervert values*/
35 enum {
36         SUBD_INNERVERT,
37         SUBD_PATH,
38         SUBD_FAN,
39         SUBD_STRAIGHT_CUT
40 };
41
42 enum {
43         SUBDIV_SELECT_ORIG,
44         SUBDIV_SELECT_INNER,
45         SUBDIV_SELECT_INNER_SEL,
46         SUBDIV_SELECT_LOOPCUT
47 };
48
49 enum {
50         SIM_CMP_EQ = 0,
51         SIM_CMP_GT,
52         SIM_CMP_LT
53 };
54
55 /* similar face selection slot values */
56 enum {
57         SIMFACE_MATERIAL = 201,
58         SIMFACE_IMAGE,
59         SIMFACE_AREA,
60         SIMFACE_SIDES,
61         SIMFACE_PERIMETER,
62         SIMFACE_NORMAL,
63         SIMFACE_COPLANAR,
64         SIMFACE_FREESTYLE
65 };
66
67 /* similar edge selection slot values */
68 enum {
69         SIMEDGE_LENGTH = 101,
70         SIMEDGE_DIR,
71         SIMEDGE_FACE,
72         SIMEDGE_FACE_ANGLE,
73         SIMEDGE_CREASE,
74         SIMEDGE_BEVEL,
75         SIMEDGE_SEAM,
76         SIMEDGE_SHARP,
77         SIMEDGE_FREESTYLE
78 };
79
80 /* similar vertex selection slot values */
81 enum {
82         SIMVERT_NORMAL = 0,
83         SIMVERT_FACE,
84         SIMVERT_VGROUP,
85         SIMVERT_EDGE
86 };
87
88 enum {
89         OPUVC_AXIS_X = 1,
90         OPUVC_AXIS_Y
91 };
92
93 enum {
94         DIRECTION_CW = 1,
95         DIRECTION_CCW
96 };
97
98 /* vertex path selection values */
99 enum {
100         VPATH_SELECT_EDGE_LENGTH = 0,
101         VPATH_SELECT_TOPOLOGICAL
102 };
103
104 extern BMOpDefine *opdefines[];
105 extern int bmesh_total_ops;
106
107 /*------specific operator helper functions-------*/
108
109 struct Object;
110
111 void BM_mesh_esubdivide(BMesh *bm, const char edge_hflag,
112                         float smooth, float fractal, float along_normal,
113                         int numcuts,
114                         int seltype, int cornertype,
115                         const short use_singleedge, const short use_gridfill,
116                         int seed);
117
118 #include "intern/bmesh_operator_api_inline.h"
119
120 #endif /* __BMESH_OPERATORS_H__ */