Merged changes in the trunk up to revision 46045.
[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 /* similar face selection slot values */
50 enum {
51         SIMFACE_MATERIAL = 201,
52         SIMFACE_IMAGE,
53         SIMFACE_AREA,
54         SIMFACE_PERIMETER,
55         SIMFACE_NORMAL,
56         SIMFACE_COPLANAR,
57         SIMFACE_FREESTYLE
58 };
59
60 /* similar edge selection slot values */
61 enum {
62         SIMEDGE_LENGTH = 101,
63         SIMEDGE_DIR,
64         SIMEDGE_FACE,
65         SIMEDGE_FACE_ANGLE,
66         SIMEDGE_CREASE,
67         SIMEDGE_SEAM,
68         SIMEDGE_SHARP,
69         SIMEDGE_FREESTYLE
70 };
71
72 /* similar vertex selection slot values */
73 enum {
74         SIMVERT_NORMAL = 0,
75         SIMVERT_FACE,
76         SIMVERT_VGROUP
77 };
78
79 enum {
80         OPUVC_AXIS_X = 1,
81         OPUVC_AXIS_Y
82 };
83
84 enum {
85         DIRECTION_CW = 1,
86         DIRECTION_CCW
87 };
88
89 /* vertex path selection values */
90 enum {
91         VPATH_SELECT_EDGE_LENGTH = 0,
92         VPATH_SELECT_TOPOLOGICAL
93 };
94
95 extern BMOpDefine *opdefines[];
96 extern int bmesh_total_ops;
97
98 /*------specific operator helper functions-------*/
99
100 struct Object;
101
102 void BM_mesh_esubdivide(BMesh *bm, const char edge_hflag,
103                         float smooth, float fractal,
104                         int numcuts,
105                         int seltype, int cornertype,
106                         const short use_singleedge, const short use_gridfill,
107                         int seed);
108
109 #include "intern/bmesh_operator_api_inline.h"
110
111 #endif /* __BMESH_OPERATORS_H__ */